QualifierData QualifierData QualifierData QualifierData Class

Definition

Contains information about a WMI qualifier.

public ref class QualifierData
public class QualifierData
type QualifierData = class
Public Class QualifierData
Inheritance
QualifierDataQualifierDataQualifierDataQualifierData

Examples

The following example lists qualifier information about the Win32_Service class using the QualifierData class. For more information about Win32_Service, see the Windows Management Instrumentation documentation.

using System;
using System.Management;

public class Sample 
{    
    public static void Main() 
    {
        // Get the WMI class
        ManagementClass mClass = 
            new ManagementClass("Win32_Service");

        mClass.Options.UseAmendedQualifiers = true;

        // Get the Qualifiers for the class
        QualifierDataCollection qualifiers =
            mClass.Qualifiers;

        // display the Qualifier names
        Console.WriteLine(mClass.ClassPath.ClassName +
            " Qualifiers: ");
        foreach (QualifierData q in qualifiers)
        {
            Console.WriteLine(q.Name);
        }
        Console.WriteLine();
        
        Console.WriteLine("Class Description: ");
        Console.WriteLine(
            mClass.Qualifiers["Description"].Value);
    }
}
Imports System
Imports System.Management


Public Class Sample
    Public Overloads Shared Function _
        Main(ByVal args() As String) As Integer

        ' Get the WMI class
        Dim mClass As ManagementClass = _
            New ManagementClass("Win32_Service")

        mClass.Options.UseAmendedQualifiers = True

        ' Get the Qualifiers for the class
        Dim qualifiers As QualifierDataCollection = _
            mClass.Qualifiers()

        ' display the Qualifier names
        Console.WriteLine(mClass.ClassPath.ClassName & _
            " Qualifiers: ")
        For Each q As QualifierData In qualifiers
            Console.WriteLine(q.Name)
        Next

        Console.WriteLine()

        Console.WriteLine("Class Description: ")
        Console.WriteLine( _
            mClass.Qualifiers("Description").Value)


    End Function
End Class

Properties

IsAmended IsAmended IsAmended IsAmended

Gets or sets a value indicating whether the qualifier is amended.

IsLocal IsLocal IsLocal IsLocal

Gets a value indicating whether the qualifier has been defined locally on this class or has been propagated from a base class.

IsOverridable IsOverridable IsOverridable IsOverridable

Gets or sets a value indicating whether the value of the qualifier can be overridden when propagated.

Name Name Name Name

Represents the name of the qualifier.

PropagatesToInstance PropagatesToInstance PropagatesToInstance PropagatesToInstance

Gets or sets a value indicating whether the qualifier should be propagated to instances of the class.

PropagatesToSubclass PropagatesToSubclass PropagatesToSubclass PropagatesToSubclass

Gets or sets a value indicating whether the qualifier should be propagated to subclasses of the class.

Value Value Value Value

Gets or sets the value of the qualifier.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to