예제 #1
0
        void ITrace.EventsPast(string eventName, string eventValue, string userId, string info, DateTime dt)
        {
            if (!string.IsNullOrEmpty(eventName))
            {
                var userAgent = (HttpContext.Current != null && HttpContext.Current.Request != null) ? HttpContext.Current.Request.UserAgent : String.Empty;

                var message = buildMessage(eventName, eventValue, userId, info, userAgent, dt);

                sendMessage(message);

                if (!processorRunning)
                {
                    ExecutingContext.RunProcessor("P", () => { processor(QueueStorage, DataServiceName); });
                }
            }
            else
            {
                Context.LogException(new SmartException(1000, "TraceEvents call with null !"));
            }
        }