添加新的服务操作。配置数据库。在调用此方法之前,在 [stepGroups] 集合列表中的所有服务的步骤组必须添加到配置数据库。
命名空间: Microsoft.TeamFoundation.Framework.Server
程序集: Microsoft.TeamFoundation.Framework.Server(在 Microsoft.TeamFoundation.Framework.Server.dll 中)
语法
声明
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
)
参数
- requestContext
类型:Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContext
请求上下文。
- servicingOperation
类型:System.String
要添加的一个服务操作,例如安装。
- stepGroups
类型:System.Collections.Generic.IEnumerable<String>
- operationExecutionHandlers
类型:System.Collections.Generic.IEnumerable<String>
- servicingLock
类型:Microsoft.TeamFoundation.Framework.Server.TeamFoundationLock
独占服务的锁。不能为 null。
异常
异常 | 条件 |
---|---|
ServicingOperationAlreadyExistsException | 同名的操作在配置数据库中已存在。 |
ServicingStepGroupNotFoundException | 至少从 [stepGroups] 集合的某项服务的步骤组在配置数据库中未定义。 |
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。