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.UriThe build which is placing the reservation
reservationSpec
Type: Microsoft.TeamFoundation.Build.Workflow.Activities.AgentReservationSpecThe reservation specification for selecting an agent
workflowInstanceId
Type: System.GuidThe workflow instance making the request
bookmarkName
Type: System.StringThe name of the bookmark to resume when a response is received
- callback
Type: System.AsyncCallback
- state
Type: System.Object
Return Value
Type: System.IAsyncResult
A system-generated ID for the reservation that was created to track the request
.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.