// Maps a URI to an Object containing the actual resource. public override object?GetEntity(Uri absoluteUri, string?role, Type?ofObjectToReturn) { if (ofObjectToReturn is null || ofObjectToReturn == typeof(System.IO.Stream) || ofObjectToReturn == typeof(object)) { return(XmlDownloadManager.GetStream(absoluteUri, _credentials, _proxy)); } throw new XmlException(SR.Xml_UnsupportedClass, string.Empty); }
// Resource resolution /// <include file='doc\XmlUrlResolver.uex' path='docs/doc[@for="XmlUrlResolver.GetEntity"]/*' /> /// <devdoc> /// <para>Maps a /// URI to an Object containing the actual resource.</para> /// </devdoc> public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) { if (ofObjectToReturn == null || ofObjectToReturn == typeof(System.IO.Stream)) { return(_DownloadManager.GetStream(absoluteUri, _credentials)); } else { throw new XmlException(Res.Xml_UnsupportedClass, string.Empty); } }