SPServiceContextScope class
SharePoint 2013
Creates a block within which an SPServiceContext object is in scope.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
The block is limited to the thread on which the object is created.
The object must be created and disposed on the same thread. Multiple objects of this type can be created on a thread, but they must be disposed in a LIFO manner. Specifically, if scopes are created in order (1,2,3,4,5), they must be disposed in the opposite order (5,4,3,2,1). Failure to do so causes an exception to be thrown.
Show: