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.
  • 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

See Also

Reference

IAgentReservationExtension Interface

Microsoft.TeamFoundation.Build.Workflow.Services Namespace