Langage

LocalizablePropertyCategoryAttribute(Type, String) Constructeur

Définition

Initialise une nouvelle instance de la LocalizablePropertyCategoryAttribute classe en utilisant le type et le nom de propriété spécifiés.

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)

Paramètres

type
Type

Le nom de type qui contient la propriété référencée par propertyName.

propertyName
String

Le nom de la propriété sur le type qui renvoie la catégorie de propriété localisée.

Exemples

L’exemple de code suivant montre une classe qui implémente cet attribut.

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

Remarques

La propriété doit être statique, et retourner un String.

S’applique à