Aracılığıyla paylaş


LocalizablePropertyCategoryAttribute(Type, String) Constructor

Definition

Initializes a new instance of the LocalizablePropertyCategoryAttribute class using the specified type and property name.

public:
 LocalizablePropertyCategoryAttribute(Type ^ type, System::String ^ propertyName);
public LocalizablePropertyCategoryAttribute (Type type, string propertyName);
new Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategoryAttribute : Type * string -> Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyCategoryAttribute
Public Sub New (type As Type, propertyName As String)

Parameters

type
Type

The type name that contains the property referenced by propertyName.

propertyName
String

The name of the property on the type that returns the localized property category.

Examples

The following code example shows a class that implements this attribute.

public class MyTask : Task  
{  
[LocalizablePropertyCategory (typeof(LocalizedStrings),"MyGeneralCategory")]  
     public string MyProperty  
{ get; set; }  
}  
internal class LocalizedStrings  
    {  
        public static string MyGeneralCategory  
        {  
            get  
            {  
                // Return the localized string.  
            }  
        }  
    }  

Remarks

The property must be static, and return a String.

Applies to