예제 #1
0
파일: MessageBus.cs 프로젝트: petxo/HermEsb
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageBus"/> class.
 /// </summary>
 public MessageBus()
 {
     Header = new MessageHeader();
 }
예제 #2
0
 /// <summary>
 ///     Equalses the specified other.
 /// </summary>
 /// <param name="other">The other.</param>
 /// <returns></returns>
 public bool Equals(MessageHeader other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.IdentificationService, IdentificationService)
            && Equals(other.BodyType, BodyType)
            && other.CreatedAt.Equals(CreatedAt)
            && other.EncodingCodePage == EncodingCodePage
            && other.ReinjectionNumber == ReinjectionNumber
            && other.Priority == Priority
            && Equals(other.Type, Type);
 }
예제 #3
0
        /// <summary>
        ///     Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>
        ///     A new object that is a copy of this instance.
        /// </returns>
        public object Clone()
        {
            var messageHeader = new MessageHeader(IdentificationService,
                                                  (Session) CallContext.Clone(),
                                                  new Stack<CallerContext>(CallStack.Reverse()),
                                                  CreatedAt)
                {
                    BodyType = BodyType,
                    EncodingCodePage = EncodingCodePage,
                    Priority = Priority,
                    ReinjectionNumber = ReinjectionNumber,
                    Type = Type,
                };

            return messageHeader;
        }
예제 #4
0
 /// <summary>
 ///     Invokes the on error handler.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="header">The header.</param>
 /// <param name="handlerType">Type of the handler.</param>
 /// <param name="exception">The exception.</param>
 /// <param name="messageBus"></param>
 private void InvokeOnErrorHandler(string message, MessageHeader header, byte[] messageBus, Type handlerType, Exception exception)
 {
     ErrorOnHandlersEventHandler handler = OnErrorHandler;
     if (handler != null)
         handler(this, new ErrorOnHandlersEventHandlerArgs
             {
                 Message = message,
                 Header = header,
                 HandlerType = handlerType,
                 Exception = exception,
                 MessageBus = messageBus
             });
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageBus"/> class.
 /// </summary>
 public MessageBus()
 {
     Header = new MessageHeader();
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MessageInfo"/> class.
 /// </summary>
 public MessageInfo()
 {
     Header = new MessageHeader();
 }