/// <summary> /// http://mookid.dk/oncode/archives/2966 /// </summary> /// <param name="bus"></param> /// <param name="headers"></param> /// <param name="message"></param> /// <param name="context"></param> private void BeforeMessageSent(IBus bus, Dictionary <string, string> headers, object message, OutgoingStepContext context) { if (_messagesTracker != null) { var msg = message as IMessage; if (msg != null) { _messagesTracker.Started(msg); } } var attribute = message.GetType() .GetCustomAttributes(typeof(TimeToBeReceivedAttribute), false) .Cast <TimeToBeReceivedAttribute>() .SingleOrDefault(); if (attribute == null) { return; } headers[Headers.TimeToBeReceived] = attribute.HmsString; }
public void Started(IMessage msg) { _originalTracker.Started(msg); }