internal virtual DeleteBranchResponse DeleteBranch(DeleteBranchRequest request)
        {
            var marshaller   = new DeleteBranchRequestMarshaller();
            var unmarshaller = DeleteBranchResponseUnmarshaller.Instance;

            return(Invoke <DeleteBranchRequest, DeleteBranchResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteBranch operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteBranch operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteBranch">REST API Reference for DeleteBranch Operation</seealso>
        public virtual Task <DeleteBranchResponse> DeleteBranchAsync(DeleteBranchRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteBranchRequestMarshaller();
            var unmarshaller = DeleteBranchResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteBranchRequest, DeleteBranchResponse>(request, marshaller,
                                                                           unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteBranch operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteBranch operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DeleteBranch">REST API Reference for DeleteBranch Operation</seealso>
        public virtual Task <DeleteBranchResponse> DeleteBranchAsync(DeleteBranchRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DeleteBranchRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DeleteBranchResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteBranchResponse>(request, options, cancellationToken));
        }
        internal virtual DeleteBranchResponse DeleteBranch(DeleteBranchRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = DeleteBranchRequestMarshaller.Instance;
            options.ResponseUnmarshaller = DeleteBranchResponseUnmarshaller.Instance;

            return(Invoke <DeleteBranchResponse>(request, options));
        }
 public SuccessResponse Delete(DeleteBranchRequest request)
 {
     try
     {
         var branch = _branchRepository.FindBy(request.Id);
         branch.ThrowExceptionIfRecordIsNull();
         var isReference = _branchRepository.IsReference(request.Id);
         isReference.ThrowExceptionIfIsReference();
         _branchRepository.Remove(branch);
         return(new SuccessResponse {
             IsSuccess = true
         });
     }
     catch (DataAccessException)
     {
         throw new ApplicationException();
     }
 }
示例#6
0
        public async Task <ActionResult> Delete(DeleteBranchRequest request)
        {
            var response = _mediator.Send(request);

            return(Ok());
        }
 public async Task DeleteBranch(DeleteBranchRequest request) =>
 await _httpFacade.Delete($"projects/{request.ProjectId}/repository/branches/{request.BranchName}");
示例#8
0
 public SuccessResponse Delete(DeleteBranchRequest request)
 {
     return(_branchService.Delete(request));
 }