Beispiel #1
0
        internal static bool AddressReply(Message reply, ReplyToInfo info)
        {
            EndpointAddress destination = null;

            if (info.HasFaultTo && (reply.IsFault))
            {
                destination = info.FaultTo;
            }
            else if (info.HasReplyTo)
            {
                destination = info.ReplyTo;
            }
            else if (reply.Version.Addressing == AddressingVersion.WSAddressingAugust2004)
            {
                if (info.HasFrom)
                {
                    destination = info.From;
                }
                else
                {
                    destination = EndpointAddress.AnonymousAddress;
                }
            }

            if (destination != null)
            {
                destination.ApplyTo(reply);
                return(!destination.IsNone);
            }
            else
            {
                return(true);
            }
        }
        internal static bool AddressReply(Message reply, ReplyToInfo info)
        {
            EndpointAddress faultTo = null;

            if (info.HasFaultTo && reply.IsFault)
            {
                faultTo = info.FaultTo;
            }
            else if (info.HasReplyTo)
            {
                faultTo = info.ReplyTo;
            }
            else if (reply.Version.Addressing == AddressingVersion.WSAddressingAugust2004)
            {
                if (info.HasFrom)
                {
                    faultTo = info.From;
                }
                else
                {
                    faultTo = EndpointAddress.AnonymousAddress;
                }
            }
            if (faultTo != null)
            {
                faultTo.ApplyTo(reply);
                return(!faultTo.IsNone);
            }
            return(true);
        }
        internal static bool AddressReply(Message reply, ReplyToInfo info)
        {
            EndpointAddress destination = null;

            if (info.HasFaultTo && (reply.IsFault))
            {
                destination = info.FaultTo;
            }
            else if (info.HasReplyTo)
            {
                destination = info.ReplyTo;
            }

            if (destination != null)
            {
                destination.ApplyTo(reply);
                return(!destination.IsNone);
            }
            else
            {
                return(true);
            }
        }
        internal static bool AddressReply(Message reply, Message request)
        {
            ReplyToInfo info = RequestReplyCorrelator.ExtractReplyToInfo(request);

            return(RequestReplyCorrelator.AddressReply(reply, info));
        }
        internal static bool AddressReply(Message reply, Message request)
        {
            ReplyToInfo info = ExtractReplyToInfo(request);

            return(AddressReply(reply, info));
        }