/// <summary> /// /// Checks out a file for external control, and retrieves the same /// file as a Stream. The file must later be checked in with the same user /// and external system, so use this method in combination with /// UploadAndCheckInFileFromExternalControl /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='checkOutAndGetFileForExternalControlArgs'> /// (See model for parameter info) /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CheckOutAndGetFileForExternalControlOKResponse> CheckOutAndGetFileForExternalControlAsync(this IFileService operations, CheckOutAndGetFileForExternalControlArgs checkOutAndGetFileForExternalControlArgs = default(CheckOutAndGetFileForExternalControlArgs), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CheckOutAndGetFileForExternalControlWithHttpMessagesAsync(checkOutAndGetFileForExternalControlArgs, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// /// Checks out a file for external control, and retrieves the same /// file as a Stream. The file must later be checked in with the same user /// and external system, so use this method in combination with /// UploadAndCheckInFileFromExternalControl /// /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='checkOutAndGetFileForExternalControlArgs'> /// (See model for parameter info) /// </param> public static CheckOutAndGetFileForExternalControlOKResponse CheckOutAndGetFileForExternalControl(this IFileService operations, CheckOutAndGetFileForExternalControlArgs checkOutAndGetFileForExternalControlArgs = default(CheckOutAndGetFileForExternalControlArgs)) { return(Task.Factory.StartNew(s => ((IFileService)s).CheckOutAndGetFileForExternalControlAsync(checkOutAndGetFileForExternalControlArgs), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }