CimSession.EnumerateAssociatedInstances Method (String, CimInstance, String, String, String, String)
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 IEnumerable<CimInstance> EnumerateAssociatedInstances(
string namespaceName,
CimInstance sourceInstance,
string associationClassName,
string resultClassName,
string sourceRole,
string resultRole
)
public:
IEnumerable<CimInstance^>^ EnumerateAssociatedInstances(
String^ namespaceName,
CimInstance^ sourceInstance,
String^ associationClassName,
String^ resultClassName,
String^ sourceRole,
String^ resultRole
)
member EnumerateAssociatedInstances :
namespaceName:string *
sourceInstance:CimInstance *
associationClassName:string *
resultClassName:string *
sourceRole:string *
resultRole:string -> IEnumerable<CimInstance>
Public Function EnumerateAssociatedInstances (
namespaceName As String,
sourceInstance As CimInstance,
associationClassName As String,
resultClassName As String,
sourceRole As String,
resultRole As String
) As IEnumerable(Of CimInstance)
Parameters
namespaceName
Type: System.StringA 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.
sourceInstance
Type: Microsoft.Management.Infrastructure.CimInstanceA CimInstance object that represents the class name and the keys of the instance where the association will start.
associationClassName
Type: System.StringA 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.StringA 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.StringA null-terminated string that contains the property name in the association object that points to the key object.
resultRole
Type: System.StringA null-terminated string that contains the property name in the association object that points to the resultant class.
Return Value
Type: System.Collections.Generic.IEnumerable<CimInstance>
An IEnumerable<T> interface that can be used to enumerate the instances.
See Also
EnumerateAssociatedInstances Overload
CimSession Class
Microsoft.Management.Infrastructure Namespace
Return to top