Esempio n. 1
0
        // Maps a URI to an Object containing the actual resource.
        public override async Task <object> GetEntityAsync(Uri absoluteUri, string?role, Type?ofObjectToReturn)
        {
            if (ofObjectToReturn == null || ofObjectToReturn == typeof(System.IO.Stream) || ofObjectToReturn == typeof(object))
            {
                return(await XmlDownloadManager.GetStreamAsync(absoluteUri, _credentials, _proxy).ConfigureAwait(false));
            }

            throw new XmlException(SR.Xml_UnsupportedClass, string.Empty);
        }