ManagementQualifierFlavors 枚举

定义

可以与 WMI 提供程序扩展一起使用的限定符类型。Qualifier flavors that can be used with WMI provider extensions.

注意:WMI .NET 库现在视为处于最终状态,且没有可用于会影响这些库的非安全性相关问题的进一步开发、增强或更新。Note: the WMI .NET libraries are now considered in final state, and no further development, enhancements, or updates will be available for non-security related issues affecting these libraries. MI API 应用于所有新的开发。The MI APIs should be used for all new development.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class ManagementQualifierFlavors
[System.Flags]
public enum ManagementQualifierFlavors
type ManagementQualifierFlavors = 
Public Enum ManagementQualifierFlavors
继承
ManagementQualifierFlavors
属性

字段

Amended 1

在基类定义中不需要限定符,并且可以将其移动到要本地化的修订。The qualifier is not required in the basic class definition and can be moved to the amendment to be localized.

ClassOnly 4

限定符传播到实例。The qualifier is propagated to instances.

DisableOverride 2

不能在派生类或实例中重写限定符。The qualifier cannot be overridden in a derived class or instance. 请注意,系统默认可以重写传播的限定符。Note that being able to override a propagated qualifier is the default.

ThisClassOnly 8

限定符不会传播到派生类。The qualifier is not propagated to derived classes.

示例

下面的示例演示如何使用 DisableOverride ManagementQualifierFlavors 枚举。The following example demonstrates how to use the DisableOverride ManagementQualifierFlavors enumeration. 此处, 它将应用于关联限定符。Here it is being applied to the Association qualifier.

[ManagementQualifier("Association",  
Flavor = ManagementQualifierFlavors.DisableOverride)]  
public class AssociationSampleBase  
{  
   [ManagementReference(Type = "UserInfo")]  
   [ManagementKey]  
   public string Configuration;  
  
   [ManagementReference(Type = "LogInfo")]  
   [ManagementKey]  
   public string Hosting;  
   //additional code omitted  

注解

若要了解有关限定符风格的详细信息, 请参阅 MSDN 上的 WMI SDK 中的限定符风格主题。To learn more about qualifier flavors read the Qualifier Flavors topic in the WMI SDK on MSDN.

适用于

另请参阅