You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,21 @@
|
||||
|
||||
using System.Runtime.Versioning;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Xml
|
||||
{
|
||||
public partial class XmlUrlResolver : XmlResolver {
|
||||
|
||||
// Maps a URI to an Object containing the actual resource.
|
||||
[ResourceConsumption(ResourceScope.Machine)]
|
||||
[ResourceExposure(ResourceScope.Machine)]
|
||||
public override async Task<Object> GetEntityAsync(Uri absoluteUri, string role, Type ofObjectToReturn) {
|
||||
if (ofObjectToReturn == null || ofObjectToReturn == typeof(System.IO.Stream) || ofObjectToReturn == typeof(System.Object)) {
|
||||
return await DownloadManager.GetStreamAsync(absoluteUri, _credentials, _proxy, _cachePolicy).ConfigureAwait(false);
|
||||
}
|
||||
else {
|
||||
throw new XmlException(Res.Xml_UnsupportedClass, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user