Retrieves all the monitoring object classes that are parents of the specified relationship type, optionally including all parent types of those parents and their derived classes. Namespace: Microsoft.EnterpriseManagement.Configuration
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)

Usage

Visual Basic
Dim instance As MonitoringClass
Dim derivedClassTraversalDepth As DerivedClassTraversalDepth
Dim relationshipClass As MonitoringRelationshipClass
Dim traversalDepth As TraversalDepth
Dim returnValue As ReadOnlyCollection(Of MonitoringClass)

returnValue = instance.GetParentMonitoringClasses(derivedClassTraversalDepth, relationshipClass, traversalDepth)

Syntax

Visual Basic
Public Function GetParentMonitoringClasses ( _
		derivedClassTraversalDepth As DerivedClassTraversalDepth, _
		relationshipClass As MonitoringRelationshipClass, _
		traversalDepth As TraversalDepth _
) As ReadOnlyCollection(Of MonitoringClass)
C#
public ReadOnlyCollection<MonitoringClass> GetParentMonitoringClasses (
		DerivedClassTraversalDepth derivedClassTraversalDepth,
		MonitoringRelationshipClass relationshipClass,
		TraversalDepth traversalDepth
)
C++
public:
ReadOnlyCollection<MonitoringClass^>^ GetParentMonitoringClasses (
		DerivedClassTraversalDepth derivedClassTraversalDepth, 
		MonitoringRelationshipClass^ relationshipClass, 
		TraversalDepth traversalDepth
)
J#
public ReadOnlyCollection<MonitoringClass> GetParentMonitoringClasses (
		DerivedClassTraversalDepth derivedClassTraversalDepth, 
		MonitoringRelationshipClass relationshipClass, 
		TraversalDepth traversalDepth
)
JScript
public function GetParentMonitoringClasses (
		derivedClassTraversalDepth : DerivedClassTraversalDepth, 
		relationshipClass : MonitoringRelationshipClass, 
		traversalDepth : TraversalDepth
) : ReadOnlyCollection<MonitoringClass>

Parameters

derivedClassTraversalDepth

Determines whether to also return monitoring classes that target classes derived from this class. A value of None does not include derived classes. A value of Recursive includes derived classes.

relationshipClass

The relationship to retrieve related monitoring classes by.

traversalDepth

Determines whether to include only instances of the base class or instances of derived classes in the returned results. 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 contained by those instances.

Return Value

A read-only collection of MonitoringClass objects.

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 Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Target Platforms

Windows Server 2008,Windows Server 2003,Windows Vista,Windows XP

See Also