예제 #1
0
        void DispatchOperationToTransport(IEnumerable <TransportOperation> operations)
        {
            foreach (var transportOperation in operations)
            {
                var deliveryOptions = transportOperation.Options.ToDeliveryOptions();

                deliveryOptions.EnlistInReceiveTransaction = false;

                var message = new TransportMessage(transportOperation.MessageId, transportOperation.Headers)
                {
                    Body = transportOperation.Body
                };

                //dispatch to transport

                if (transportOperation.Options["Operation"] != "Audit")
                {
                    DispatchMessageToTransportBehavior.InvokeNative(deliveryOptions, message);
                }
                else
                {
                    DefaultMessageAuditer.Audit(deliveryOptions as SendOptions, message);
                }
            }
        }
예제 #2
0
        void DispatchOperationToTransport(IEnumerable <TransportOperation> operations)
        {
            foreach (var transportOperation in operations)
            {
                var deliveryOptions = transportOperation.Options.ToDeliveryOptions();

                deliveryOptions.EnlistInReceiveTransaction = false;

                var message = new TransportMessage(transportOperation.MessageId, transportOperation.Headers)
                {
                    Body = transportOperation.Body
                };

                string ttbr;

                if (transportOperation.Options.TryGetValue("TimeToBeReceived", out ttbr))
                {
                    message.TimeToBeReceived = TimeSpan.Parse(ttbr);
                }

                //dispatch to transport

                if (transportOperation.Options["Operation"] != "Audit")
                {
                    DispatchMessageToTransportBehavior.InvokeNative(deliveryOptions, message);
                }
                else
                {
                    DefaultMessageAuditer.Audit(deliveryOptions as SendOptions, message);
                }
            }
        }