Поделиться через


IAgentReservationExtension.BeginReserveAgent Method

Reserves an agent for use with a call to RunWorkflow. A call to ReserveAgent will result in an AgentReservationCompletedEventArgs event being added into the response queue. After the agent has been used it should be returned to the system by a call to ReleaseAgent.

Namespace:  Microsoft.TeamFoundation.Build.Workflow.Services
Assembly:  Microsoft.TeamFoundation.Build.Workflow (in Microsoft.TeamFoundation.Build.Workflow.dll)

Syntax

'Declaration
Function BeginReserveAgent ( _
    buildUri As Uri, _
    reservationSpec As AgentReservationSpec, _
    workflowInstanceId As Guid, _
    bookmarkName As String, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
IAsyncResult BeginReserveAgent(
    Uri buildUri,
    AgentReservationSpec reservationSpec,
    Guid workflowInstanceId,
    string bookmarkName,
    AsyncCallback callback,
    Object state
)
IAsyncResult^ BeginReserveAgent(
    Uri^ buildUri, 
    AgentReservationSpec^ reservationSpec, 
    Guid workflowInstanceId, 
    String^ bookmarkName, 
    AsyncCallback^ callback, 
    Object^ state
)
abstract BeginReserveAgent : 
        buildUri:Uri * 
        reservationSpec:AgentReservationSpec * 
        workflowInstanceId:Guid * 
        bookmarkName:string * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult
function BeginReserveAgent(
    buildUri : Uri, 
    reservationSpec : AgentReservationSpec, 
    workflowInstanceId : Guid, 
    bookmarkName : String, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult

Parameters

  • buildUri
    Type: System.Uri

    The build which is placing the reservation

  • workflowInstanceId
    Type: System.Guid

    The 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.IAsyncResult
A system-generated ID for the reservation that was created to track the request

.NET Framework Security

See Also

Reference

IAgentReservationExtension Interface

Microsoft.TeamFoundation.Build.Workflow.Services Namespace