Freigeben über


ManagementGroup.GetRelatedMonitoringObjects<T> Method (ICollection<T>, MonitoringRelationshipClass, TraversalDepth)

 

Applies To: Operations Manager for System Center 2012

Note: This API is now obsolete.

Retrieves a collection of the monitoring object instances that are related to the specified monitoring objects, with the option to include instances of derived classes.

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

Syntax

[ObsoleteAttribute("Please use EntityObjects.GetRelatedObjects<T>()")]
public Dictionary<T, ReadOnlyCollection<MonitoringObject>> GetRelatedMonitoringObjects<T>(
    ICollection<T> monitoringObjects,
    MonitoringRelationshipClass relationshipClass,
    TraversalDepth traversalDepth
)
where T : PartialMonitoringObjectBase
public:
generic<typename T>
where T : PartialMonitoringObjectBase
[ObsoleteAttribute("Please use EntityObjects.GetRelatedObjects<T>()")]
Dictionary<T, ReadOnlyCollection<MonitoringObject^>^>^ GetRelatedMonitoringObjects(
    ICollection<T>^ monitoringObjects,
    MonitoringRelationshipClass^ relationshipClass,
    TraversalDepth traversalDepth
)
[<ObsoleteAttribute("Please use EntityObjects.GetRelatedObjects<T>()")>]
member GetRelatedMonitoringObjects<'T when 'T : PartialMonitoringObjectBase> : 
        monitoringObjects:ICollection<'T> *
        relationshipClass:MonitoringRelationshipClass *
        traversalDepth:TraversalDepth -> Dictionary<'T, ReadOnlyCollection<MonitoringObject>>
<ObsoleteAttribute("Please use EntityObjects.GetRelatedObjects<T>()")>
Public Function GetRelatedMonitoringObjects(Of T As PartialMonitoringObjectBase) (
    monitoringObjects As ICollection(Of T),
    relationshipClass As MonitoringRelationshipClass,
    traversalDepth As TraversalDepth
) As Dictionary(Of T, ReadOnlyCollection(Of MonitoringObject))

Parameters

  • traversalDepth
    Type: Microsoft.EnterpriseManagement.Common.TraversalDepth

    A value that modifies the limits of the relationshipClass parameter. A value of OneLevel includes only instances of the specified class in the scope of the returned results. A value of Recursive includes instances of the specified class and all instances that are contained by those instances.

Return Value

Type: System.Collections.Generic.Dictionary<T, ReadOnlyCollection<MonitoringObject>>

Returns aDictionary<TKey, TValue> object ofMonitoringObject objects.

Type Parameters

See Also

GetRelatedMonitoringObjects Overload
ManagementGroup Class
Microsoft.EnterpriseManagement Namespace

Return to top