Exemplo n.º 1
0
        private FaultCode CreateFaultCode(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
        {
            switch (faultCode)
            {
            case OiosiFaultCode.Sender:
                FaultCode senderInnerFaultCode = CreateSenderFaultCode(innerFaultCode);
                return(FaultCode.CreateSenderFaultCode(senderInnerFaultCode));

            case OiosiFaultCode.Receiver:
                FaultCode recieverInnerFaultCode = CreateRecieverFaultCode(innerFaultCode);
                return(FaultCode.CreateReceiverFaultCode(recieverInnerFaultCode));

            default:
                throw new OiosiMessageFaultUnexpectedFaultCode(faultCode);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="e">exception</param>
        /// <param name="faultCode">fault code</param>
        /// <param name="innerFaultCode">inner fault code</param>
        public OiosiMessageFault(Exception e, OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
        {
            StringBuilder reasonMessage    = new StringBuilder();
            Exception     currentException = e;

            do
            {
                reasonMessage.Append(currentException.Message);
                if (currentException.InnerException != null)
                {
                    reasonMessage.Append("\n");
                }
                currentException = currentException.InnerException;
            } while (currentException != null);
            _reason = new FaultReason(reasonMessage.ToString());
            _code   = CreateFaultCode(faultCode, innerFaultCode);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="oiosiFaultCode"></param>
 /// <param name="oiosiInnerFaultCode"></param>
 /// <param name="message">The message</param>
 public InterceptorChannelWrapperException(OiosiFaultCode oiosiFaultCode, OiosiInnerFaultCode oiosiInnerFaultCode, string message)
     : base(oiosiFaultCode, oiosiInnerFaultCode, CreatKeywords(message))
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="innerException">The inner exception</param>
 public InterceptorChannelWrapperException(OiosiFaultCode oiosiFaultCode, OiosiInnerFaultCode oiosiInnerFaultCode, Exception innerException)
     : base(oiosiFaultCode, oiosiInnerFaultCode, CreatKeywords(innerException.Message))
 {
 }
Exemplo n.º 5
0
 private FaultCode CreateRecieverFaultCode(OiosiInnerFaultCode innerFaultCode)
 {
     return(new FaultCode(innerFaultCode.ToString()));
 }
Exemplo n.º 6
0
 private FaultCode CreateSenderFaultCode(OiosiInnerFaultCode innerFaultCode)
 {
     return(new FaultCode((innerFaultCode.ToString())));
 }
Exemplo n.º 7
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="faultCode"></param>
 /// <param name="innerFaultCode"></param>
 /// <param name="message">The message</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, string message)
     : base(message)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Constructor with faultcode and innerfaultcode
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode)
     : base()
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="innerException">The inner exception</param>
 public InterceptorChannelException(Exception innerException) : base(innerException)
 {
     pFaultCode      = OiosiFaultCode.Receiver;
     pInnerFaultCode = OiosiInnerFaultCode.InternalSystemFailureFault;
 }
Exemplo n.º 10
0
 /// <summary>
 /// Constructor with faultcode, innerfaultcode, keywords and innerexception
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 /// <param name="keywords">keywords for the message</param>
 /// <param name="innerException">innerexception of the thrown exception</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, System.Collections.Generic.Dictionary <string, string> keywords, System.Exception innerException)
     : base(keywords, innerException)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }
Exemplo n.º 11
0
 /// <summary>
 /// Constructor with faultcode, innerfaultcode and innerexception
 /// </summary>
 /// <param name="faultCode">rasp message fault code</param>
 /// <param name="innerFaultCode">rasp message innerfault code</param>
 /// <param name="innerException">innerexception of the thrown exception</param>
 public InterceptorChannelException(OiosiFaultCode faultCode, OiosiInnerFaultCode innerFaultCode, System.Exception innerException)
     : base(innerException)
 {
     pFaultCode      = faultCode;
     pInnerFaultCode = innerFaultCode;
 }