Пример #1
0
 public OngoingCapture(IExecutionTimer executionTimer, IMessageBroker messageBroker, string eventName, string eventSubText, TimelineCategoryItem category, ITimelineMessage message)
 {
     Offset         = executionTimer.Start();
     ExecutionTimer = executionTimer;
     Message        = message.AsTimelineMessage(eventName, category, eventSubText);
     MessageBroker  = messageBroker;
 }
Пример #2
0
        protected void WriteTimelineMessageCore(ITimelineMessage timelineMessage)
        {
            var timerResult = _timer.Stop(_offset);
            var message = timelineMessage
                .AsTimelineMessage(EventName, CategoryItem)
                .AsTimedMessage(timerResult);

            _messageBroker.Publish(message);
        }
Пример #3
0
        protected void WriteTimelineMessageCore(ITimelineMessage timelineMessage)
        {
            var timerResult = _timer.Stop(_offset);
            var message     = timelineMessage
                              .AsTimelineMessage(EventName, CategoryItem)
                              .AsTimedMessage(timerResult);

            _messageBroker.Publish(message);
        }
Пример #4
0
        internal static void CaptureMoment(string eventName, string eventSubText, TimelineCategoryItem category, ITimelineMessage message)
        {
            if (string.IsNullOrEmpty(eventName))
            {
                throw new ArgumentNullException("eventName");
            }

#pragma warning disable 618
            var executionTimer = GlimpseConfiguration.GetConfiguredTimerStrategy()();
            var messageBroker  = GlimpseConfiguration.GetConfiguredMessageBroker();
#pragma warning restore 618

            if (executionTimer == null || messageBroker == null)
            {
                return;
            }

            message
            .AsTimelineMessage(eventName, category, eventSubText)
            .AsTimedMessage(executionTimer.Point());

            messageBroker.Publish(message);
        }
        internal static void CaptureMoment(string eventName, string eventSubText, TimelineCategoryItem category, ITimelineMessage message)
        {
            if (string.IsNullOrEmpty(eventName))
            {
                throw new ArgumentNullException("eventName");
            }

            #pragma warning disable 618
            var executionTimer = GlimpseConfiguration.GetConfiguredTimerStrategy()();
            var messageBroker = GlimpseConfiguration.GetConfiguredMessageBroker();
            #pragma warning restore 618

            if (executionTimer == null || messageBroker == null)
            {
                return;
            }

            message
                .AsTimelineMessage(eventName, category, eventSubText)
                .AsTimedMessage(executionTimer.Point());

            messageBroker.Publish(message);
        }
 public OngoingCapture(IExecutionTimer executionTimer, IMessageBroker messageBroker, string eventName, string eventSubText, TimelineCategoryItem category, ITimelineMessage message)
 {
     Offset = executionTimer.Start();
     ExecutionTimer = executionTimer;
     Message = message.AsTimelineMessage(eventName, category, eventSubText);
     MessageBroker = messageBroker;
 }