Esempio n. 1
0
 /// <summary>
 /// utility constructor to create an RequestError instance with all fields set </summary>
 /// <param name="type"> </param>
 /// <param name="httpResponseCode"> </param>
 /// <param name="messageId"> </param>
 /// <param name="text"> </param>
 /// <param name="variables"> </param>
 public RequestError(int type, int httpResponseCode, string messageId, string clientCorrelator, string text, params string[] variables)
 {
     if (type == SERVICEEXCEPTION)
     {
         serviceException = new ServiceException();
         serviceException.MessageId = messageId;
         serviceException.Text = text;
         serviceException.Variables = variables;
     }
     else if (type == POLICYEXCEPTION)
     {
         policyException = new PolicyException();
         policyException.MessageId = messageId;
         policyException.Text = text;
         policyException.Variables = variables;
     }
     ExceptionType = type;
     ClientCorrelator = clientCorrelator;
     HttpResponseCode = httpResponseCode;
 }
Esempio n. 2
0
 /// <summary>
 /// utility constructor to create an RequestError instance with all fields set </summary>
 /// <param name="type"> </param>
 /// <param name="httpResponseCode"> </param>
 /// <param name="messageId"> </param>
 /// <param name="text"> </param>
 /// <param name="variables"> </param>
 public RequestError(int type, int httpResponseCode, string messageId, string clientCorrelator, string text, params string[] variables)
 {
     if (type == SERVICEEXCEPTION)
     {
         serviceException           = new ServiceException();
         serviceException.MessageId = messageId;
         serviceException.Text      = text;
         serviceException.Variables = variables;
     }
     else if (type == POLICYEXCEPTION)
     {
         policyException           = new PolicyException();
         policyException.MessageId = messageId;
         policyException.Text      = text;
         policyException.Variables = variables;
     }
     ExceptionType    = type;
     ClientCorrelator = clientCorrelator;
     HttpResponseCode = httpResponseCode;
 }