Поделиться через


Конструктор LocalizablePropertyCategoryAttribute

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

Пространство имен:  Microsoft.SqlServer.Dts.Runtime.Localization
Сборка:  Microsoft.SqlServer.ManagedDTS (в Microsoft.SqlServer.ManagedDTS.dll)

Синтаксис

'Декларация
Public Sub New ( _
    type As Type, _
    propertyName As String _
)
'Применение
Dim type As Type
Dim propertyName As String

Dim instance As New LocalizablePropertyCategoryAttribute(type, propertyName)
public LocalizablePropertyCategoryAttribute(
    Type type,
    string propertyName
)
public:
LocalizablePropertyCategoryAttribute(
    Type^ type, 
    String^ propertyName
)
new : 
        type:Type * 
        propertyName:string -> LocalizablePropertyCategoryAttribute
public function LocalizablePropertyCategoryAttribute(
    type : Type, 
    propertyName : String
)

Параметры

  • type
    Тип: System. . :: . .Type
    The type name that contains the property referenced by propertyName.
  • propertyName
    Тип: System. . :: . .String
    The name of the property on the type that returns the localized property category.

Замечания

The property must be static, and return a String.

Примеры

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.
            }
        }
    }