/// <summary> /// Modifies the Container with the Id provided to the values supplied. /// Returns the modified Container. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the Container to be modified. Must be double URL encoded. /// </param> /// <param name='updatedItem'> /// Item to be updated. All modfied properties will be changed. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ContainerModel> UpdateAsync(this IContainers operations, string id, UpdateContainerModel updatedItem, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(id, updatedItem, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Modifies the Container with the Id provided to the values supplied. /// Returns the modified Container. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// Id of the Container to be modified. Must be double URL encoded. /// </param> /// <param name='updatedItem'> /// Item to be updated. All modfied properties will be changed. /// </param> public static ContainerModel Update(this IContainers operations, string id, UpdateContainerModel updatedItem) { return(Task.Factory.StartNew(s => ((IContainers)s).UpdateAsync(id, updatedItem), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }