Adds a new servicing operation to the configuration database. All servicing step groups listed in the stepGroups collection must be added to the configuration database before you call this method.
Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Sub AddServicingOperation ( _
    requestContext As TeamFoundationRequestContext, _
    servicingOperation As String, _
    stepGroups As IEnumerable(Of String), _
    operationExecutionHandlers As IEnumerable(Of String), _
    servicingLock As TeamFoundationLock _
)
public void AddServicingOperation(
    TeamFoundationRequestContext requestContext,
    string servicingOperation,
    IEnumerable<string> stepGroups,
    IEnumerable<string> operationExecutionHandlers,
    TeamFoundationLock servicingLock
)
public:
void AddServicingOperation(
    TeamFoundationRequestContext^ requestContext, 
    String^ servicingOperation, 
    IEnumerable<String^>^ stepGroups, 
    IEnumerable<String^>^ operationExecutionHandlers, 
    TeamFoundationLock^ servicingLock
)
member AddServicingOperation : 
        requestContext:TeamFoundationRequestContext * 
        servicingOperation:string * 
        stepGroups:IEnumerable<string> * 
        operationExecutionHandlers:IEnumerable<string> * 
        servicingLock:TeamFoundationLock -> unit
public function AddServicingOperation(
    requestContext : TeamFoundationRequestContext, 
    servicingOperation : String, 
    stepGroups : IEnumerable<String>, 
    operationExecutionHandlers : IEnumerable<String>, 
    servicingLock : TeamFoundationLock
)
Parameters
- requestContext 
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext- A request context. 
- servicingOperation 
 Type: System.String- A servicing operation to be added, such as Install. 
- stepGroups
 Type: System.Collections.Generic.IEnumerable<String>
- operationExecutionHandlers
 Type: System.Collections.Generic.IEnumerable<String>
- servicingLock 
 Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationLock- An exclusive servicing lock. Cannot be null. 
Exceptions
| Exception | Condition | 
|---|---|
| ServicingOperationAlreadyExistsException | An operation with the same name already exists in the configuration database. | 
| ServicingStepGroupNotFoundException | At least one servicing step group from the stepGroups collection is not defined in the configuration database. | 
.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.
See Also
Reference
TeamFoundationServicingService Class