/// <summary> /// /// Creates New file version and Updates properties of the file /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='updateFileArgs'> /// (See model for parameter info) /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <UpdateFileOKResponse> UpdateFileAsync(this IFileService operations, UpdateFileArgs updateFileArgs = default(UpdateFileArgs), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateFileWithHttpMessagesAsync(updateFileArgs, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// /// Creates New file version and Updates properties of the file /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='updateFileArgs'> /// (See model for parameter info) /// </param> public static UpdateFileOKResponse UpdateFile(this IFileService operations, UpdateFileArgs updateFileArgs = default(UpdateFileArgs)) { return(Task.Factory.StartNew(s => ((IFileService)s).UpdateFileAsync(updateFileArgs), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }