public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache)
 {
     string uriString = reader.ReadElementContentAsString();
     if (uriString == version.Anonymous)
     {
         return version.AnonymousUri;
     }
     if (uriCache == null)
     {
         return new Uri(uriString);
     }
     return uriCache.CreateUri(uriString);
 }
 public static ToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache, string actor, bool mustUnderstand, bool relay)
 {
     Uri to = ReadHeaderValue(reader, version, uriCache);
     if (((actor.Length != 0) || !mustUnderstand) || relay)
     {
         return new FullToHeader(to, actor, mustUnderstand, relay, version);
     }
     if (to != version.Anonymous)
     {
         return new ToHeader(to, version);
     }
     if (version == AddressingVersion.WSAddressing10)
     {
         return AnonymousTo10;
     }
     return AnonymousTo200408;
 }
Ejemplo n.º 3
0
        public static ToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache,
            string actor, bool mustUnderstand, bool relay)
        {
            Uri to = ReadHeaderValue(reader, version, uriCache);

            if (actor.Length == 0 && mustUnderstand == mustUnderstandValue && !relay)
            {
                if ((object)to == (object)version.Anonymous)
                {
                    if (version == AddressingVersion.WSAddressing10)
                        return AnonymousTo10;
                    else
                        throw ExceptionHelper.PlatformNotSupported();
                }
                else
                {
                    return new ToHeader(to, version);
                }
            }
            else
            {
                return new FullToHeader(to, actor, mustUnderstand, relay, version);
            }
        }
Ejemplo n.º 4
0
        public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache)
        {
            Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.To, version.DictionaryNamespace), "");

            string toString = reader.ReadElementContentAsString();

            if ((object)toString == (object)version.Anonymous)
            {
                return version.AnonymousUri;
            }

            if (uriCache == null)
            {
                return new Uri(toString);
            }

            return uriCache.CreateUri(toString);
        }
Ejemplo n.º 5
0
        public static ToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache,
                                          string actor, bool mustUnderstand, bool relay)
        {
            Uri to = ReadHeaderValue(reader, version, uriCache);

            if (actor.Length == 0 && mustUnderstand == mustUnderstandValue && !relay)
            {
                if ((object)to == (object)version.Anonymous)
                {
                    if (version == AddressingVersion.WSAddressing10)
                    {
                        return(AnonymousTo10);
                    }
                    else
                    {
                        throw ExceptionHelper.PlatformNotSupported();
                    }
                }
                else
                {
                    return(new ToHeader(to, version));
                }
            }
            else
            {
                return(new FullToHeader(to, actor, mustUnderstand, relay, version));
            }
        }
Ejemplo n.º 6
0
        public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache)
        {
            Fx.Assert(reader.IsStartElement(XD.AddressingDictionary.To, version.DictionaryNamespace), "");

            string toString = reader.ReadElementContentAsString();

            if ((object)toString == (object)version.Anonymous)
            {
                return(version.AnonymousUri);
            }

            if (uriCache == null)
            {
                return(new Uri(toString));
            }

            return(uriCache.CreateUri(toString));
        }
        public static Uri ReadHeaderValue(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache)
        {
            string uriString = reader.ReadElementContentAsString();

            if (uriString == version.Anonymous)
            {
                return(version.AnonymousUri);
            }
            if (uriCache == null)
            {
                return(new Uri(uriString));
            }
            return(uriCache.CreateUri(uriString));
        }
        public static ToHeader ReadHeader(XmlDictionaryReader reader, AddressingVersion version, UriCache uriCache, string actor, bool mustUnderstand, bool relay)
        {
            Uri to = ReadHeaderValue(reader, version, uriCache);

            if (((actor.Length != 0) || !mustUnderstand) || relay)
            {
                return(new FullToHeader(to, actor, mustUnderstand, relay, version));
            }
            if (to != version.Anonymous)
            {
                return(new ToHeader(to, version));
            }
            if (version == AddressingVersion.WSAddressing10)
            {
                return(AnonymousTo10);
            }
            return(AnonymousTo200408);
        }