/// <inheritdoc /> public async Task<byte[]> GetImageAsync(IRenderable file, string imageFormat, CancellationToken cancellationToken) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; var response = await this.serviceClient.SendAsync<byte[]>(request, cancellationToken).ConfigureAwait(false); return response.Content; }
/// <inheritdoc /> public async Task <byte[]> GetImageAsync(IRenderable file, string imageFormat, CancellationToken cancellationToken) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; var response = await this.serviceClient.SendAsync <byte[]>(request, cancellationToken).ConfigureAwait(false); return(response.Content); }
/// <inheritdoc /> public Task<byte[]> GetImageAsync(IRenderable file, string imageFormat, CancellationToken cancellationToken) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; return this.serviceClient.SendAsync<byte[]>(request, cancellationToken).ContinueWith( task => { var response = task.Result; return response.Content; }, cancellationToken); }
/// <inheritdoc /> byte[] IRenderService.GetImage(IRenderable file, string imageFormat) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; var response = this.serviceClient.Send<byte[]>(request); if (response.Content == null) { return null; } return response.Content; }
/// <inheritdoc /> byte[] IRenderService.GetImage(IRenderable file, string imageFormat) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; var response = this.serviceClient.Send <byte[]>(request); if (response.Content == null) { return(null); } return(response.Content); }
/// <inheritdoc /> public Task <byte[]> GetImageAsync(IRenderable file, string imageFormat, CancellationToken cancellationToken) { var request = new RenderRequest { FileId = file.FileId, FileSignature = file.FileSignature, ImageFormat = imageFormat }; return(this.serviceClient.SendAsync <byte[]>(request, cancellationToken).ContinueWith( task => { var response = task.Result; return response.Content; }, cancellationToken)); }