2015-04-07 09:35:12 +01:00
|
|
|
|
|
|
|
using System.Security.Permissions;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
namespace System.Xml {
|
|
|
|
|
|
|
|
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
|
|
|
|
public partial class XmlSecureResolver : XmlResolver {
|
|
|
|
public override Task<object> GetEntityAsync(Uri absoluteUri, string role, Type ofObjectToReturn) {
|
2015-08-26 07:17:56 -04:00
|
|
|
#if !DISABLE_CAS_USE
|
2015-04-07 09:35:12 +01:00
|
|
|
permissionSet.PermitOnly();
|
2015-08-26 07:17:56 -04:00
|
|
|
#endif
|
2015-04-07 09:35:12 +01:00
|
|
|
return resolver.GetEntityAsync(absoluteUri, role, ofObjectToReturn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|