Remove securitystate (dotnet/coreclr#10649)
authorDan Moseley <danmose@microsoft.com>
Sun, 2 Apr 2017 10:16:23 +0000 (03:16 -0700)
committerJan Kotas <jkotas@microsoft.com>
Sun, 2 Apr 2017 10:16:23 +0000 (03:16 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/0b1877f2e35a548f26fca05085232630e04b79b7

src/coreclr/src/mscorlib/System.Private.CoreLib.csproj
src/coreclr/src/mscorlib/src/System/AppDomainManager.cs
src/coreclr/src/mscorlib/src/System/Security/SecurityState.cs [deleted file]

index a5cce4f..2153d78 100644 (file)
   </ItemGroup>
   <ItemGroup>
     <Compile Include="$(BclSourcesRoot)\System\Security\DynamicSecurityMethodAttribute.cs" />
-    <Compile Include="$(BclSourcesRoot)\System\Security\SecurityState.cs" />
     <Compile Include="$(BclSourcesRoot)\System\Security\VerificationException.cs" />
   </ItemGroup>
   <ItemGroup>
index 1c7fb08..830de29 100644 (file)
@@ -55,10 +55,5 @@ namespace System
                 return AppDomain.CurrentDomain.DomainManager;
             }
         }
-
-        public virtual bool CheckSecuritySettings(SecurityState state)
-        {
-            return false;
-        }
     }
 }
diff --git a/src/coreclr/src/mscorlib/src/System/Security/SecurityState.cs b/src/coreclr/src/mscorlib/src/System/Security/SecurityState.cs
deleted file mode 100644 (file)
index 5f42011..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Security;
-
-namespace System.Security
-{
-    internal abstract class SecurityState
-    {
-        protected SecurityState() { }
-
-        public bool IsStateAvailable()
-        {
-            AppDomainManager domainManager = AppDomainManager.CurrentAppDomainManager;
-
-            // CheckSecuritySettings only when appdomainManager is present. So if there is no 
-            // appDomain Manager return true as by default coreclr runs in fulltrust. 
-            return domainManager != null ? domainManager.CheckSecuritySettings(this) : true;
-        }
-        // override this function and throw the appropriate 
-        public abstract void EnsureState();
-    }
-}