Exemple #1
0
        public static async Task <ApiActionResult> FailedAsync(ServiceError error)
        {
            var errors = new List <ServiceError>()
            {
                error
            };
            var result = new ApiActionResult(false, errors);

            return(await Task.FromResult(result));
        }
Exemple #2
0
        public static ApiActionResult Failed(string error)
        {
            var errors = new List <ServiceError>()
            {
                new ServiceError("", error)
            };
            var result = new ApiActionResult(false, errors);

            return(result);
        }
Exemple #3
0
        public static ApiActionResult Failed(ServiceError error)
        {
            var errors = new List <ServiceError>()
            {
                error
            };
            var result = new ApiActionResult(false, errors);

            return(result);
        }
Exemple #4
0
        public static ApiActionResult Failed(List <ServiceError> errors)
        {
            var result = new ApiActionResult(false, errors);

            return(result);
        }
Exemple #5
0
        public static ApiActionResult Success()
        {
            var result = new ApiActionResult(true);

            return(result);
        }
Exemple #6
0
        public static async Task <ApiActionResult> SuccessAsync(object responseData = null)
        {
            var result = new ApiActionResult(true, responseData);

            return(await Task.FromResult(result));
        }