/// <summary> /// Gets the operation status for a resource. /// </summary> /// <remarks> /// Gets the operation result for a resource /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='operationId'> /// </param> /// <param name='location'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <OperationJobExtendedInfo> GetAsync(this IOperationResultOperations operations, string operationId, string location, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(operationId, location, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets the status of a long-running operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IOperationResultOperations. /// </param> /// <param name='trackingId'> /// Required. The operation tracking id. /// </param> /// <returns> /// Operation response for OperationResultOperations.Get. /// </returns> public static RemoteAppOperationStatusResult Get(this IOperationResultOperations operations, string trackingId) { return(Task.Factory.StartNew((object s) => { return ((IOperationResultOperations)s).GetAsync(trackingId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the RemoteAppManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public RemoteAppManagementClient(HttpClient httpClient) : base(httpClient) { this._account = new AccountsOperations(this); this._collections = new CollectionOperations(this); this._operationResults = new OperationResultOperations(this); this._principals = new PrincipalOperations(this); this._publishing = new PublishingOperations(this); this._templateImages = new TemplateImageOperations(this); this._vNet = new VNetOperations(this); this._rdfeNamespace = "remoteapp"; this._apiVersion = "2014-09-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets the status of a long-running operation. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.RemoteApp.IOperationResultOperations. /// </param> /// <param name='trackingId'> /// Required. The operation tracking id. /// </param> /// <returns> /// Operation response for OperationResultOperations.Get. /// </returns> public static Task <RemoteAppOperationStatusResult> GetAsync(this IOperationResultOperations operations, string trackingId) { return(operations.GetAsync(trackingId, CancellationToken.None)); }
/// <summary> /// Gets the operation status for a resource. /// </summary> /// <remarks> /// Gets the operation result for a resource /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='operationId'> /// </param> /// <param name='location'> /// </param> public static OperationJobExtendedInfo Get(this IOperationResultOperations operations, string operationId, string location) { return(operations.GetAsync(operationId, location).GetAwaiter().GetResult()); }