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));
        }
Beispiel #2
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)
        {
            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);
 }