Example #1
0
 public Package(Status status, T data, int code = 0, TypeError type = default)
 {
     Status = status;
     Data   = data;
     Code   = code;
     Type   = type.ToString();
 }
Example #2
0
        public String GetMessageError(Int32?errorId, TypeError type)
        {
            String message = configuration.GetSection($"{type.ToString()}:{errorId}").Value;

            if (String.IsNullOrEmpty(message))
            {
                message = $"Unhandled error. {errorId}";
            }

            return(message);
        }