SPMonitoredScope.GetMonitor<T> Method

Retrieves the monitor of the specified type from the current scope.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No


<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.GenericMethod)> _
Public Function GetMonitor(Of T As ISPScopedPerformanceMonitor) As T
Dim instance As SPMonitoredScope
Dim returnValue As T

returnValue = instance.GetMonitor()
public T GetMonitor<T>()
where T : ISPScopedPerformanceMonitor

Type Parameters

  • T
    The type of monitor to be found.

Return Value

Type: T
Returns the monitor of the specified type, if it exists within the current scope. Otherwise, this method returns the default T.

See Also


SPMonitoredScope Class

SPMonitoredScope Members

Microsoft.SharePoint.Utilities Namespace