Share via


LocalizablePropertyCategoryAttribute(Type, String) Constructeur

Définition

Initialise une nouvelle instance de la classe LocalizablePropertyCategoryAttribute à l’aide du type spécifié et du nom de propriété.

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

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

propertyName
String

Nom de la propriété sur le type qui retourne 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 à