Share via


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)

Syntax

'Declaration
Public Function GetMonitor(Of T As ISPScopedPerformanceMonitor) As T
'Usage
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

Reference

SPMonitoredScope class

SPMonitoredScope members

Microsoft.SharePoint.Utilities namespace