ManagementEntityAttribute.Name Propriedade
Definição
Obtém ou define o nome da classe da WMI.Gets or sets the name of the WMI class.
public:
property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String
Valor da propriedade
Uma cadeia de caracteres que contém o nome da classe WMI.A string that contains the name of the WMI class.
Exemplos
No exemplo a seguir, o parâmetro Name é usado para definir o nome da classe WMI representada pela classe MortgageCalcWMIProvider.In the following example, the Name parameter is used to set the name of the WMI class represented by the MortgageCalcWMIProvider class. Ele define o nome para MortgageCalculator.It sets the name to MortgageCalculator. Se o parâmetro Name não for usado, o nome da classe C# correspondente, MortgageCalcWMIProvider nesse caso, será usado como o nome da classe WMI.If the Name parameter is not used, the corresponding C# class name, MortgageCalcWMIProvider in this case, is used as the WMI class name.
[ManagementEntity(Name = "MortgageCalculator")]
public class MortgageCalcWMIProvider
{
}
Comentários
Se você não especificar o nome da classe WMI definindo essa propriedade, a classe WMI usará como padrão o nome da classe atribuída.If you do not specify the name of the WMI class by setting this property, the WMI class will default to the name of the attributed class.