public static SimpleResponseDto <T> Failed(ResponseCodeEnum responseCodeEnum) { SimpleResponseDto <T> dto = NewInstance(); dto.Code = ((int)responseCodeEnum).ToString(); dto.Message = responseCodeEnum.GetMessage(); dto.ServerTime = DateTime.Now.Ticks; return(dto); }
public static SimpleResponseDto <T> SystemException(Exception e) { ResponseCodeEnum responseCodeEnum = ResponseCodeEnum.ResponseCode_500; SimpleResponseDto <T> dto = NewInstance(); dto.Code = ((int)responseCodeEnum).ToString(); dto.Message = responseCodeEnum.GetMessage(); dto.ServerTime = DateTime.Now.Ticks; return(dto); }