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
Syntax
'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.GenericMethod)> _
Public Function GetMonitor(Of T As ISPScopedPerformanceMonitor) As T
'Usage
Dim instance As SPMonitoredScope
Dim returnValue As T
returnValue = instance.GetMonitor()
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.GenericMethod)]
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.