Exemplo n.º 1
0
        /// <summary>
        /// Invokes the sent message.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="size">The size.</param>
        protected void InvokeSentMessage(string type, int size)
        {
            MessageGatewayEventHandler handler = SentMessage;

            if (handler != null)
            {
                Task.Factory.StartNew(() => handler(this, new MessageGatewayEventHandlerArgs
                {
                    MessageType = type,
                    Size        = size
                }));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Invokes the sent message.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="size">The size.</param>
        protected void InvokeSentMessage(string type, int size)
        {
            MessageGatewayEventHandler handler = SentMessage;

            if (handler != null)
            {
                handler(this, new MessageGatewayEventHandlerArgs
                {
                    MessageType = type,
                    Size        = size
                });
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Invokes the received message.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="size">The size.</param>
        /// <param name="createdAt">The created at.</param>
        protected void InvokeReceivedMessage(string type, int size, DateTime createdAt)
        {
            MessageGatewayEventHandler handler = OnMessageBusReceived;

            if (handler != null)
            {
                Task.Factory.StartNew(() => handler(this, new MessageGatewayEventHandlerArgs
                {
                    CreatedAt   = createdAt,
                    MessageType = type,
                    Size        = size
                }));
            }
        }