public static void TrackDirectSend(TrackingContext trackingContext, XLANGMessage message, bool trackMessageBody, bool skipMessageContextTracking)
        {
            var messagingStepTracking = new MessagingStep(Tracking.ActivityId.NewActivityId(), message);

            messagingStepTracking.BeginMessagingStepActivity();
            if (trackMessageBody)
            {
                messagingStepTracking.TrackMessageBody();
            }
            if (!skipMessageContextTracking)
            {
                messagingStepTracking.TrackMessageContext();
            }
            messagingStepTracking.TrackStep(TrackingStatus.Sent);
            messagingStepTracking.CommitMessagingStepActivity();
            messagingStepTracking.EndMessagingStepActivity();

            trackingContext.MessagingStepActivityId = messagingStepTracking.ActivityId;
            trackingContext.Apply(message);

            new Process(trackingContext.ProcessActivityId).AddStep(messagingStepTracking);
        }
Exemple #2
0
 private static XLANGMessage Transform(XlangMessageCollection messages, Type map, TrackingContext trackingContext, System.Xml.Xsl.XsltArgumentList arguments)
 {
     if (messages == null)
     {
         throw new ArgumentNullException("messages");
     }
     if (messages.Count == 0)
     {
         throw new ArgumentException("XLangMessageCollection is empty.", "messages");
     }
     if (map == null)
     {
         throw new ArgumentNullException("map");
     }
     using (messages)
     {
         var resultContent = Transform(messages, map, arguments);
         var resultMessage = XlangMessage.Create(Service.RootService.XlangStore.OwningContext, resultContent);
         trackingContext.Apply(resultMessage);
         return(resultMessage);
     }
 }