private static void SendInitiatorMessage(HttpRequest request, string initiator, MessageAction action, MessageTarget target, params string[] description)
        {
            if (sender == null)
            {
                return;
            }

            var message = MessageFactory.Create(request, initiator, action, target, description);

            if (!MessagePolicy.Check(message))
            {
                return;
            }

            sender.Send(message);
        }
        private static void SendHeadersMessage(MessageUserData userData, Dictionary <string, string> httpHeaders, MessageAction action, MessageTarget target, params string[] description)
        {
            if (sender == null)
            {
                return;
            }

            var message = MessageFactory.Create(userData, httpHeaders, action, target, description);

            if (!MessagePolicy.Check(message))
            {
                return;
            }

            sender.Send(message);
        }
Пример #3
0
        public static int SendLoginMessage(HttpRequest request, MessageUserData userData, MessageAction action)
        {
            if (sender == null)
            {
                return(0);
            }

            var message = MessageFactory.Create(request, userData, action);

            if (!MessagePolicy.Check(message))
            {
                return(0);
            }

            var id = sender.Send(message);

            return(id);
        }
        private static void SendRequestMessage(HttpRequest request, string loginName, MessageAction action, MessageTarget target, params string[] description)
        {
            if (sender == null)
            {
                return;
            }

            if (request == null)
            {
                log.Debug(string.Format("Empty Http Request for \"{0}\" type of event", action));
                return;
            }

            var message = MessageFactory.Create(request, loginName, action, target, description);

            if (!MessagePolicy.Check(message))
            {
                return;
            }

            sender.Send(message);
        }
Пример #5
0
        private static void SendHeadersMessage(Dictionary <string, string> httpHeaders, MessageAction action, params string[] description)
        {
            if (sender == null)
            {
                return;
            }

            if (httpHeaders == null)
            {
                log.Debug(string.Format("Empty Request Headers for \"{0}\" type of event", action));
                return;
            }

            var message = MessageFactory.Create(httpHeaders, action, description);

            if (!MessagePolicy.Check(message))
            {
                return;
            }

            sender.Send(message);
        }
Пример #6
0
        private static void SendApiMessage(ApiContext context, string loginName, MessageAction action, params string[] description)
        {
            if (sender == null)
            {
                return;
            }

            if (context == null)
            {
                log.Debug(string.Format("Empty Api Context for \"{0}\" type of event", action));
                return;
            }

            var message = MessageFactory.Create(context, loginName, action, description);

            if (!MessagePolicy.Check(message))
            {
                return;
            }

            sender.Send(message);
        }