QualifierDataCollection Class
TOC
Collapse the table of content
Expand the table of content

QualifierDataCollection Class

 

Represents a collection of QualifierData objects.

Namespace:   System.Management
Assembly:  System.Management (in System.Management.dll)

System.Object
  System.Management.QualifierDataCollection

public class QualifierDataCollection : ICollection, IEnumerable

NameDescription
System_CAPS_pubpropertyCount

Gets the number of QualifierData objects in the QualifierDataCollection.

System_CAPS_pubpropertyIsSynchronized

Gets a value indicating whether the object is synchronized.

System_CAPS_pubpropertyItem[String]

Gets the specified QualifierData from the QualifierDataCollection.

System_CAPS_pubpropertySyncRoot

Gets the object to be used for synchronization.

NameDescription
System_CAPS_pubmethodAdd(String, Object)

Adds a QualifierData to the QualifierDataCollection. This overload specifies the qualifier name and value.

System_CAPS_pubmethodAdd(String, Object, Boolean, Boolean, Boolean, Boolean)

Adds a QualifierData to the QualifierDataCollection. This overload specifies all property values for a QualifierData.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the QualifierDataCollection into an array.

System_CAPS_pubmethodCopyTo(QualifierData[], Int32)

Copies the QualifierDataCollection into a specialized QualifierData array.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Returns an enumerator for the QualifierDataCollection. This method is strongly typed.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(String)

Removes a QualifierData from the QualifierDataCollection by name.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an IEnumerator that iterates through the QualifierDataCollection.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

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 in the MSDN Library at http://msdn.microsoft.com/library.

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);
    }
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft