共用方式為


IEntityObjectsManagement.GetRelatedObjects Method (ICollection, ICollection, TraversalDepth, ObjectQueryOptions)

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets a collection of management pack objects that are related to the list of identifiers, from any containment relationship. This is further filtered by the list of management pack classes and derived classes, traversal depth, and query options.

Namespace: Microsoft.EnterpriseManagement
Assembly: Microsoft.EnterpriseManagement.Core (in Microsoft.EnterpriseManagement.Core.dll)

Usage

'Usage
Dim instance As IEntityObjectsManagement
Dim instanceIds As ICollection(Of Guid)
Dim managementPackClasses As ICollection(Of ManagementPackClass)
Dim traversalDepth As TraversalDepth
Dim queryOptions As ObjectQueryOptions
Dim returnValue As Dictionary(Of Guid, IList(Of T))

returnValue = instance.GetRelatedObjects(instanceIds, managementPackClasses, traversalDepth, queryOptions)

Syntax

'Declaration
Function GetRelatedObjects(Of T As EnterpriseManagementObject) ( _
    instanceIds As ICollection(Of Guid), _
    managementPackClasses As ICollection(Of ManagementPackClass), _
    traversalDepth As TraversalDepth, _
    queryOptions As ObjectQueryOptions _
) As Dictionary(Of Guid, IList(Of T))
Dictionary<Guid,IList<T>> GetRelatedObjects<T> (
    ICollection<Guid> instanceIds,
    ICollection<ManagementPackClass> managementPackClasses,
    TraversalDepth traversalDepth,
    ObjectQueryOptions queryOptions
) where T : EnterpriseManagementObject
generic<typename T> where T : EnterpriseManagementObject
Dictionary<Guid, IList<T>^>^ GetRelatedObjects (
    ICollection<Guid>^ instanceIds, 
    ICollection<ManagementPackClass^>^ managementPackClasses, 
    TraversalDepth traversalDepth, 
    ObjectQueryOptions^ queryOptions
)

GenericParameters

  • T
    The type to cast the management pack objects as.

Parameters

  • instanceIds
    List of unique object identifiers.
  • managementPackClasses
    The list of management pack classes to return.
  • traversalDepth
    One of the enumeration values.
  • queryOptions
    The query options.

Return Value

A dictionary of discovered objects.

Exceptions

Exception type Condition
ArgumentNullException

The returned instances are null (Nothing in Visual Basic) or the managementPackClasses parameter is a null reference.

ArgumentOutOfRangeException

The returned instances are empty.

InvalidOperationException

The returned instances contains duplicates.

Thread Safety

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

Platforms

Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

Windows Server 2008,Windows Server 2003

See Also

Reference

IEntityObjectsManagement Interface
IEntityObjectsManagement Members
Microsoft.EnterpriseManagement Namespace