public void ReturnError(HttpEnum.ResponseStatus resultStatus, string message, string referenceNo = default, List <string> errors = null, Dictionary <string, List <string> > propErrors = null)
 {
     Result      = new KeyValuePair <HttpEnum.ResponseStatus, string>(resultStatus, resultStatus.ToString());
     Message     = !string.IsNullOrWhiteSpace(message) ? message : resultStatus.ToString();
     ReferenceNo = !string.IsNullOrWhiteSpace(referenceNo) ? referenceNo : Guid.NewGuid().ToString();
     Errors      = errors;
     PropErrors  = propErrors;
     InnerData   = default;
 }
 public void ReturnSuccess(T data, HttpEnum.ResponseStatus resultStatus, string message)
 {
     Result      = new KeyValuePair <HttpEnum.ResponseStatus, string>(resultStatus, resultStatus.ToString());
     Message     = !string.IsNullOrWhiteSpace(message) ? message : resultStatus.ToString();
     InnerData   = data;
     ReferenceNo = default;
     Errors      = default;
     PropErrors  = default;
 }
Beispiel #3
0
 public string GetMessage(HttpEnum.ResponseStatus responseStatus) => GetKeyValue(responseStatus.ToString());