IAgentReservationExtension.ReserveAgent Method
Reserves an agent for use with a call to RunWorkflow.
Namespace: Microsoft.TeamFoundation.Build.Workflow.Services
Assembly: Microsoft.TeamFoundation.Build.Workflow (in Microsoft.TeamFoundation.Build.Workflow.dll)
Syntax
'Declaration
Function ReserveAgent ( _
buildUri As Uri, _
reservationSpec As AgentReservationSpec, _
workflowInstanceId As Guid, _
bookmarkName As String _
) As Integer
int ReserveAgent(
Uri buildUri,
AgentReservationSpec reservationSpec,
Guid workflowInstanceId,
string bookmarkName
)
int ReserveAgent(
Uri^ buildUri,
AgentReservationSpec^ reservationSpec,
Guid workflowInstanceId,
String^ bookmarkName
)
abstract ReserveAgent :
buildUri:Uri *
reservationSpec:AgentReservationSpec *
workflowInstanceId:Guid *
bookmarkName:string -> int
function ReserveAgent(
buildUri : Uri,
reservationSpec : AgentReservationSpec,
workflowInstanceId : Guid,
bookmarkName : String
) : int
Parameters
- buildUri
Type: System.Uri
The URI of the build placing the reservation.
- reservationSpec
Type: Microsoft.TeamFoundation.Build.Workflow.Activities.AgentReservationSpec
The reservation specification for selecting an agent.
- workflowInstanceId
Type: System.Guid
The GUID workflow instance making the request.
- bookmarkName
Type: System.String
The name of the bookmark to resume when a response is received.
Return Value
Type: System.Int32
A system-generated ID for the reservation that was created to track the request.
Remarks
A call to ReserveAgent will result in an AgentReservationCompletedEventArgs event being placed into the response queue. After the agent has been used it should be returned to the system by a call to ReleaseAgent.
.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.