예제 #1
0
        public UseCaseResponse <T> SetRequestValidatorError(IEnumerable <ValidationFailure> validationErrors)
        {
            this.Status = UseCaseResponseStatus.ValidateError;
            var errors = validationErrors.Select(x => new ErrorMessage(x.ErrorCode, x.ErrorMessage));

            return(this.SetErrors(errors));
        }
예제 #2
0
 public UseCaseResponse <T> SetResourceNotFountError(IEnumerable <ErrorMessage> errors = null)
 {
     this.Status = UseCaseResponseStatus.ResourceNotFountError;
     return(this.SetErrors(errors));
 }
예제 #3
0
 public UseCaseResponse <T> SetResourceNotFountError(string errorCode, string errorMessage)
 {
     this.Status = UseCaseResponseStatus.ResourceNotFountError;
     return(this.SetErrors(new ErrorMessage[] { new ErrorMessage(errorCode, errorMessage) }));
 }
예제 #4
0
 public UseCaseResponse <T> SetGenericError(IEnumerable <ErrorMessage> errors)
 {
     this.Status = UseCaseResponseStatus.ExceptionError;
     return(this.SetErrors(errors));
 }
예제 #5
0
 public UseCaseResponse <T> SetResult(T result)
 {
     this.Status = UseCaseResponseStatus.Success;
     this.Result = result;
     return(this);
 }
예제 #6
0
 public GetInvoiceByCodeResponse(UseCaseResponseStatus status, FullInvoice result = null) : base(status)
 {
     Result = result;
 }
예제 #7
0
 protected UseCaseResponseMessage(UseCaseResponseStatus status)
 {
     Status = status;
 }