Lenguaje

LocalizablePropertyCategoryAttribute(Type, String) Constructor

Definición

Inicializa una nueva instancia de la LocalizablePropertyCategoryAttribute clase usando el tipo y nombre de propiedad especificados.

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)

Parámetros

type
Type

El nombre del tipo que contiene la propiedad referenciada por propertyName.

propertyName
String

El nombre de la propiedad en el type devuelve la categoría de propiedad localizada.

Ejemplos

El siguiente ejemplo de código muestra una clase que implementa este atributo.

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

Comentarios

La propiedad debe ser estática y devolver un String.

Se aplica a