LocalizablePropertyCategoryAttribute(Type, String) Constructeur
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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
.