共用方式為


CimSession.EnumerateAssociatedInstancesAsync Method (String, CimInstance, String, String, String, String)

 

Asynchronously finds instances that are associated with the specific key instance.

Namespace:   Microsoft.Management.Infrastructure
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Syntax

public CimAsyncMultipleResults<CimInstance> EnumerateAssociatedInstancesAsync(
    string namespaceName,
    CimInstance sourceInstance,
    string associationClassName,
    string resultClassName,
    string sourceRole,
    string resultRole
)
public:
CimAsyncMultipleResults<CimInstance^>^ EnumerateAssociatedInstancesAsync(
    String^ namespaceName,
    CimInstance^ sourceInstance,
    String^ associationClassName,
    String^ resultClassName,
    String^ sourceRole,
    String^ resultRole
)
member EnumerateAssociatedInstancesAsync : 
        namespaceName:string *
        sourceInstance:CimInstance *
        associationClassName:string *
        resultClassName:string *
        sourceRole:string *
        resultRole:string -> CimAsyncMultipleResults<CimInstance>
Public Function EnumerateAssociatedInstancesAsync (
    namespaceName As String,
    sourceInstance As CimInstance,
    associationClassName As String,
    resultClassName As String,
    sourceRole As String,
    resultRole As String
) As CimAsyncMultipleResults(Of CimInstance)

Parameters

  • namespaceName
    Type: System.String

    A null-terminated string that contains the optional namespace name to carry out the operation. If none is specified, the server will pick a default. The namespace cannot include a computer name. It can only be in the form of a namespace name separated by a slash mark character (/). For example, the following would be a valid namespaceName value: root/cimv2.

  • associationClassName
    Type: System.String

    A null-terminated string that contains the optional value that specifies to map the association by using only this association class. If this value is NULL, then any association class will be used.

  • resultClassName
    Type: System.String

    A null-terminated string that contains the optional values that restrict the result set to only this class. Specify NULL for no filtering.

  • sourceRole
    Type: System.String

    A null-terminated string that contains the property name in the association object that points to the key object.

  • resultRole
    Type: System.String

    A null-terminated string that contains the property name in the association object that points to the resultant class.

Return Value

Type: Microsoft.Management.Infrastructure.Generic.CimAsyncMultipleResults<CimInstance>

A CimAsyncMultipleResults<T> object that represents an asynchronous operation that returns multiple results.

See Also

EnumerateAssociatedInstancesAsync Overload
CimSession Class
Microsoft.Management.Infrastructure Namespace

Return to top