SPServiceContext.Current property

Gets the service context for the application that is currently running.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared ReadOnly Property Current As SPServiceContext
    Get
'Usage
Dim value As SPServiceContext

value = SPServiceContext.Current
public static SPServiceContext Current { get; }

Property value

Type: Microsoft.SharePoint.SPServiceContext
A SPServiceContext that is the current service context.

Remarks

This property is equivalent to calling the GetContext(HttpContext) method and specifying HttpContext.Current for the httpContext parameter.

See also

Reference

SPServiceContext class

SPServiceContext members

Microsoft.SharePoint namespace