/// <inheritdoc />
 public async Task DeleteAsync(RemoteDocumentTarget target, CancellationToken cancellationToken)
 {
     using (var response = await Client.DeleteAsync(target.DestinationUrl, cancellationToken))
     {
         response.EnsureSuccessStatusCode();
     }
 }
        /// <inheritdoc />
        public override async Task <ActionResult> ExecuteAsync(IDocument source, RemoteDocumentTarget destination, CancellationToken cancellationToken)
        {
            try
            {
                using (var stream = await source.OpenReadAsync(cancellationToken))
                {
                    var content = new StreamContent(stream);
                    var request = new HttpRequestMessage(HttpMethod.Put, destination.DestinationUrl)
                    {
                        Content = content,
                        Headers =
                        {
                            { "Overwrite", "T" },
                        },
                    };

                    using (var response = await Client
                                          .SendAsync(request, cancellationToken)
                           )
                    {
                        response.EnsureSuccessStatusCode();
                    }
                }
            }
            catch (Exception ex)
            {
                return(new ActionResult(ActionStatus.OverwriteFailed, destination)
                {
                    Exception = ex,
                });
            }

            return(new ActionResult(ActionStatus.Overwritten, destination));
        }
 /// <inheritdoc />
 public Task <IReadOnlyCollection <XName> > SetPropertiesAsync(RemoteDocumentTarget target, IEnumerable <IUntypedWriteableProperty> properties, CancellationToken cancellationToken)
 {
     return(SetPropertiesAsync(target.DestinationUrl, properties, cancellationToken));
 }
 /// <inheritdoc />
 public abstract Task <ActionResult> ExecuteAsync(IDocument source, RemoteDocumentTarget destination, CancellationToken cancellationToken);