Beispiel #1
0
        public ExceptionShield(string serviceKey, string methodKey, object[] parameters, Exception exception, string userFullName)
        {
            _parameters = parameters;
             _exception = exception;

             _exceptionMessage = new ExceptionMessage();
             _exceptionMessage.ServiceKey = serviceKey;
             _exceptionMessage.MethodKey = methodKey;
             _exceptionMessage.UserFullName = userFullName;
             _exceptionMessage.ExceptionsTime = DateTime.Now.ToString();
             _exceptionMessage.ExceptionMessages = GetExceptionMessages(exception);
             _exceptionMessage.StackTrace = GetExceptionStackTrace(exception);
             _exceptionMessage.ExceptionType = exception.GetType().Name;
        }
Beispiel #2
0
      public static ChannelResponse GetChannelResponseWithError()
      {
         ChannelResponse result = new ChannelResponse();
         result.Message = new ResponseMessage();

         ExceptionMessage message = new ExceptionMessage();
         message.ServiceKey = typeof (FakeProxy).Name;
         message.ExceptionType = "Stub";
         message.ExceptionMessages = new List<string>(new string[1] {"stub"});
         result.Message.ExceptionMessage = message;

         return result;
      }