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