DisableServicing is used to prevent servicing jobs from being performed. All servicing must be completed before servicing can be disabled.
Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Function DisableServicing ( _
    requestContext As TeamFoundationRequestContext, _
    disableReason As String, _
    processIdentifier As String, _
    waitForActiveJobs As Boolean _
) As Boolean
public bool DisableServicing(
    TeamFoundationRequestContext requestContext,
    string disableReason,
    string processIdentifier,
    bool waitForActiveJobs
)
public:
bool DisableServicing(
    TeamFoundationRequestContext^ requestContext, 
    String^ disableReason, 
    String^ processIdentifier, 
    bool waitForActiveJobs
)
member DisableServicing : 
        requestContext:TeamFoundationRequestContext * 
        disableReason:string * 
        processIdentifier:string * 
        waitForActiveJobs:bool -> bool
public function DisableServicing(
    requestContext : TeamFoundationRequestContext, 
    disableReason : String, 
    processIdentifier : String, 
    waitForActiveJobs : boolean
) : boolean
Parameters
- requestContext
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
- disableReason 
 Type: System.String- The message to return to all jobs that run when disabled. 
- processIdentifier 
 Type: System.String- The process used to disable servicing. 
- waitForActiveJobs 
 Type: System.Boolean- Wait for servicing to complete or return immediately if active. 
Return Value
Type: System.Boolean
true if servicing was disabled; if not, false is returned.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.