Exemplo n.º 1
0
        protected override void Preprocess(MessageEx message)
        {
            MessageLabel messageLabel    = MessageLabel.Parse(message.Message.Label);
            var          idForCorelation = messageLabel.IdForCorrelation;

            if (string.IsNullOrWhiteSpace(idForCorelation))
            {
                idForCorelation = message.Message.Id;
            }
            var newMessageLabel = new MessageLabel(messageLabel.WindowsIdentityName, idForCorelation);

            message.Message.Label = newMessageLabel.ToString();
        }
        private static void FillIdForCorrelationAndWindowsIdentity(TransportMessage result, Message m)
        {
            var messageLabel = MessageLabel.Parse(m.Label);

            if (!string.IsNullOrEmpty(messageLabel.IdForCorrelation))
            {
                result.IdForCorrelation = messageLabel.IdForCorrelation;
            }

            if (!string.IsNullOrEmpty(messageLabel.WindowsIdentityName))
            {
                result.WindowsIdentityName = messageLabel.WindowsIdentityName;
            }
        }