summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs')
-rw-r--r--src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs b/src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs
index 85be61a00d..c4facbb67e 100644
--- a/src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs
+++ b/src/mscorlib/src/System/Security/Permissions/HostProtectionPermission.cs
@@ -41,11 +41,9 @@ namespace System.Security.Permissions
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false )]
[System.Runtime.InteropServices.ComVisible(true)]
[Serializable]
-#if FEATURE_CORECLR
// This needs to be in the asmmeta to enable SecAnnotate to successfully resolve and run the security rules. It gets marked
// as internal by BCLRewriter so we are simply marking it as FriendAccessAllowed so it stays in the asmmeta.
[System.Runtime.CompilerServices.FriendAccessAllowedAttribute]
-#endif // FEATURE_CORECLR
#pragma warning disable 618
sealed public class HostProtectionAttribute : CodeAccessSecurityAttribute
#pragma warning restore 618
@@ -247,38 +245,6 @@ namespace System.Security.Permissions
return new HostProtectionPermission(m_resources);
}
-#if FEATURE_CAS_POLICY
- //------------------------------------------------------
- //
- // XML
- //
- //------------------------------------------------------
- public override SecurityElement ToXml()
- {
- SecurityElement esd = CodeAccessPermission.CreatePermissionElement( this, this.GetType().FullName );
- if(IsUnrestricted())
- esd.AddAttribute( "Unrestricted", "true" );
- else
- esd.AddAttribute( "Resources", XMLUtil.BitFieldEnumToString( typeof( HostProtectionResource ), Resources ) );
- return esd;
- }
-
- public override void FromXml(SecurityElement esd)
- {
- CodeAccessPermission.ValidateElement( esd, this );
- if (XMLUtil.IsUnrestricted( esd ))
- Resources = HostProtectionResource.All;
- else
- {
- String resources = esd.Attribute( "Resources" );
- if (resources == null)
- Resources = HostProtectionResource.None;
- else
- Resources = (HostProtectionResource)Enum.Parse( typeof( HostProtectionResource ), resources );
- }
- }
-#endif // FEATURE_CAS_POLICY
-
//------------------------------------------------------
//
// OBJECT OVERRIDES