Exemplo n.º 1
0
        public static string GetMesage(this ServiceResponseCode value)
        {
            FieldInfo field = value.GetType().GetField(value.ToString());

            object[] attribs = field.GetCustomAttributes(typeof(MessageAttribute), true);
            return(((MessageAttribute)attribs[0]).Message);
        }
 public ServiceResponseValidationData(ServiceResponseCode responseCode, string message, IDictionary <string, string[]> validationErrors)
     : base(responseCode, message)
 {
     ValidationErrors = validationErrors;
 }
Exemplo n.º 3
0
 public EtechnosoftException(ServiceResponseCode errorCode, string errormessage)
     : this(errormessage ?? errorCode.GetMesage())
 {
     ErrorCode = errorCode;
 }
Exemplo n.º 4
0
 public EtechnosoftException(ServiceResponseCode errorCode) : base(errorCode.GetMesage())
 {
     this.ErrorCode = errorCode;
 }