Beispiel #1
0
 public override string ToString()
 {
     return(SR.Format(SR.MessageVersionToStringFormat, envelope.ToString(), addressing.ToString()));
 }
Beispiel #2
0
 public static ToHeader Create(Uri to, AddressingVersion addressingVersion)
 {
     if ((object)to == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(to));
     }
     else if ((object)to == (object)addressingVersion.AnonymousUri)
     {
         if (addressingVersion == AddressingVersion.WSAddressing10)
         {
             return(AnonymousTo10);
         }
         else
         {
             throw new PlatformNotSupportedException($"Unsupported addressing version {addressingVersion.ToString()}");
         }
         //return AnonymousTo200408;
     }
     else
     {
         return(new ToHeader(to, addressingVersion));
     }
 }
Beispiel #3
0
        public static ReplyToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version,
                                               string actor, bool mustUnderstand, bool relay)
        {
            EndpointAddress replyTo = ReadHeaderValue(reader, version);

            if (actor.Length == 0 && mustUnderstand == mustUnderstandValue && !relay)
            {
                if ((object)replyTo == (object)EndpointAddress.AnonymousAddress)
                {
                    if (version == AddressingVersion.WSAddressing10)
                    {
                        return(AnonymousReplyTo10);
                    }
                    else
                    {
                        //return AnonymousReplyTo200408;
                        throw new PlatformNotSupportedException($"Addressing version {version.ToString()} not supported");
                    }
                }
                return(new ReplyToHeader(replyTo, version));
            }
            else
            {
                return(new FullReplyToHeader(replyTo, actor, mustUnderstand, relay, version));
            }
        }
Beispiel #4
0
        public static ToHeader Create(Uri toUri, XmlDictionaryString dictionaryTo, AddressingVersion addressingVersion)
        {
            if (addressingVersion == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("addressingVersion");
            }

            if (((object)toUri == (object)addressingVersion.AnonymousUri))
            {
                if (addressingVersion == AddressingVersion.WSAddressing10)
                {
                    return(AnonymousTo10);
                }
                else
                {
                    //return AnonymousTo200408;
                    throw new PlatformNotSupportedException($"Unsupported adressing version {addressingVersion.ToString()}");
                }
            }
            else
            {
                return(new DictionaryToHeader(toUri, dictionaryTo, addressingVersion));
            }
        }