internal static Uri UriFromString(TryParseUriCallback uriParser, string uriString, UriKind uriKind, string localName, string namespaceURI, XmlReader reader)
        {
            Uri uri = null;
            var elementQualifiedName = new XmlQualifiedName(localName, namespaceURI);
            var xmlUriData           = new XmlUriData(uriString, uriKind, elementQualifiedName);

            object[] args = new object[] { xmlUriData, uri };
            try
            {
                foreach (Delegate parser in uriParser.GetInvocationList())
                {
                    if ((bool)parser.Method.Invoke(parser.Target, args))
                    {
                        uri = (Uri)args[args.Length - 1];
                        return(uri);
                    }
                }
            }
            catch (Exception e)
            {
                throw new XmlException(FeedUtils.AddLineInfo(reader, SR.ErrorParsingUri), e);
            }

            DefaultUriParser(xmlUriData, out uri);
            return(uri);
        }
 internal static bool DefaultUriParser(XmlUriData XmlUriData, out Uri uri)
 {
     uri = new Uri(XmlUriData.UriString, XmlUriData.UriKind);
     return(true);
 }