internal async Task RemoveTagAsync(RemoteRepositoryTag tag, IProgress <OperationProgress> progress, CancellationToken cancellationToken) { Verify.Argument.IsNotNull(tag, nameof(tag)); Verify.Argument.IsFalse(tag.IsDeleted, nameof(tag), Resources.ExcSuppliedObjectIsDeleted.UseAsFormat("tag")); var parameters = GetRemoveRemoteReferenceParameters(tag); await Remote.Repository.Accessor .RemoveRemoteReferences.InvokeAsync(parameters, progress, cancellationToken); _remoteTags.Remove(tag.Name); tag.MarkAsDeleted(); InvokeTagDeleted(tag); //return Remote.Repository.Accessor // .RemoveRemoteReferences.InvokeAsync(parameters, progress, cancellationToken) // .ContinueWith( // t => // { // TaskUtility.PropagateFaultedStates(t); // _remoteTags.Remove(tag.Name); // tag.MarkAsDeleted(); // InvokeTagDeleted(tag); // }, // cancellationToken, // TaskContinuationOptions.ExecuteSynchronously, // TaskScheduler.Default); }
internal void RemoveTag(RemoteRepositoryTag tag) { Verify.Argument.IsNotNull(tag, nameof(tag)); Verify.Argument.IsFalse(tag.IsDeleted, nameof(tag), Resources.ExcSuppliedObjectIsDeleted.UseAsFormat("tag")); var parameters = GetRemoveRemoteReferenceParameters(tag); Remote.Repository.Accessor.RemoveRemoteReferences.Invoke(parameters); _remoteTags.Remove(tag.Name); tag.MarkAsDeleted(); InvokeTagDeleted(tag); }