summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Moseley <danmose@microsoft.com>2017-02-07 14:10:09 -0800
committerGitHub <noreply@github.com>2017-02-07 14:10:09 -0800
commitc35e8dbc37e5380f46553510d0368aad04a677d2 (patch)
tree62e2316f5a30f3cddd507b562b2bf4dc73ac72ef /src
parent3c34cce7187e44c024331ad6267c6507034e48bd (diff)
downloadcoreclr-c35e8dbc37e5380f46553510d0368aad04a677d2.tar.gz
coreclr-c35e8dbc37e5380f46553510d0368aad04a677d2.tar.bz2
coreclr-c35e8dbc37e5380f46553510d0368aad04a677d2.zip
Remove more CAS (#9390)
* Remove PermissionSet * Remove HostProtectionAttribute * Remove PermissionState * Remove S.Security.Permissions * Remove IPrincipal * Fix native side * Remove model.xml again
Diffstat (limited to 'src')
-rw-r--r--src/mscorlib/Common/PinnableBufferCache.cs1
-rw-r--r--src/mscorlib/src/CleanupToDoList.cs25
-rw-r--r--src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/RegistryKey.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs1
-rw-r--r--src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs1
-rw-r--r--src/mscorlib/src/System/Activator.cs1
-rw-r--r--src/mscorlib/src/System/AppDomain.cs1
-rw-r--r--src/mscorlib/src/System/ArgumentOutOfRangeException.cs1
-rw-r--r--src/mscorlib/src/System/Array.cs1
-rw-r--r--src/mscorlib/src/System/Attribute.cs1
-rw-r--r--src/mscorlib/src/System/BCLDebug.cs1
-rw-r--r--src/mscorlib/src/System/BadImageFormatException.cs1
-rw-r--r--src/mscorlib/src/System/Collections/ArrayList.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Comparer.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Generic/DebugView.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Generic/Dictionary.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Generic/List.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Hashtable.cs1
-rw-r--r--src/mscorlib/src/System/DBNull.cs1
-rw-r--r--src/mscorlib/src/System/DateTime.cs1
-rw-r--r--src/mscorlib/src/System/DateTimeOffset.cs1
-rw-r--r--src/mscorlib/src/System/DelegateSerializationHolder.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Assert.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Contracts/ContractsBCL.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Debugger.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Eventing/EventDescriptor.cs2
-rw-r--r--src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs3
-rw-r--r--src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs3
-rw-r--r--src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Stackframe.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/Stacktrace.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/log.cs1
-rw-r--r--src/mscorlib/src/System/Environment.cs1
-rw-r--r--src/mscorlib/src/System/Exception.cs1
-rw-r--r--src/mscorlib/src/System/GC.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/CompareInfo.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/CultureInfo.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/JapaneseCalendar.cs2
-rw-r--r--src/mscorlib/src/System/Globalization/NumberFormatInfo.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/StringInfo.cs1
-rw-r--r--src/mscorlib/src/System/Globalization/TextInfo.cs1
-rw-r--r--src/mscorlib/src/System/IO/Directory.cs1
-rw-r--r--src/mscorlib/src/System/IO/File.cs1
-rw-r--r--src/mscorlib/src/System/IO/FileLoadException.cs1
-rw-r--r--src/mscorlib/src/System/IO/FileNotFoundException.cs1
-rw-r--r--src/mscorlib/src/System/IO/MemoryStream.cs1
-rw-r--r--src/mscorlib/src/System/IO/Stream.cs1
-rw-r--r--src/mscorlib/src/System/IO/StreamReader.cs1
-rw-r--r--src/mscorlib/src/System/IO/TextReader.cs1
-rw-r--r--src/mscorlib/src/System/IO/UnmanagedMemoryAccessor.cs1
-rw-r--r--src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs1
-rw-r--r--src/mscorlib/src/System/IO/UnmanagedMemoryStreamWrapper.cs1
-rw-r--r--src/mscorlib/src/System/IO/__Error.cs1
-rw-r--r--src/mscorlib/src/System/Lazy.cs1
-rw-r--r--src/mscorlib/src/System/MissingMemberException.cs1
-rw-r--r--src/mscorlib/src/System/OperatingSystem.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Assembly.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/AssemblyName.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/ConstructorInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/CustomAttribute.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs24
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderData.cs23
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs3
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/EventToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/FieldToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/Label.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/LocalBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/MethodToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/OpCodes.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/Opcode.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/StringToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/TypeToken.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/EventInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/FieldInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/MdImport.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/MemberInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/MethodBase.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/MethodInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Missing.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Module.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/ParameterInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/PropertyInfo.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs1
-rw-r--r--src/mscorlib/src/System/Resources/ResourceManager.cs1
-rw-r--r--src/mscorlib/src/System/Resources/ResourceReader.cs1
-rw-r--r--src/mscorlib/src/System/Resources/ResourceSet.cs1
-rw-r--r--src/mscorlib/src/System/RtType.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/GcSettings.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/CriticalHandle.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/IException.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/SafeBuffer.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/MemoryFailPoint.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs1
-rw-r--r--src/mscorlib/src/System/RuntimeHandles.cs1
-rw-r--r--src/mscorlib/src/System/Security/SecurityException.cs3
-rw-r--r--src/mscorlib/src/System/Security/SecurityState.cs1
-rw-r--r--src/mscorlib/src/System/Text/ASCIIEncoding.cs1
-rw-r--r--src/mscorlib/src/System/Text/DecoderNLS.cs1
-rw-r--r--src/mscorlib/src/System/Text/EncoderNLS.cs1
-rw-r--r--src/mscorlib/src/System/Text/Encoding.cs1
-rw-r--r--src/mscorlib/src/System/Text/Latin1Encoding.cs1
-rw-r--r--src/mscorlib/src/System/Text/UTF7Encoding.cs1
-rw-r--r--src/mscorlib/src/System/Text/UTF8Encoding.cs1
-rw-r--r--src/mscorlib/src/System/Text/UnicodeEncoding.cs1
-rw-r--r--src/mscorlib/src/System/Threading/AutoResetEvent.cs1
-rw-r--r--src/mscorlib/src/System/Threading/CancellationToken.cs1
-rw-r--r--src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs1
-rw-r--r--src/mscorlib/src/System/Threading/CancellationTokenSource.cs1
-rw-r--r--src/mscorlib/src/System/Threading/CountdownEvent.cs1
-rw-r--r--src/mscorlib/src/System/Threading/EventWaitHandle.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ExecutionContext.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Interlocked.cs1
-rw-r--r--src/mscorlib/src/System/Threading/LazyInitializer.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ManualResetEvent.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ManualResetEventSlim.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Monitor.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Mutex.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Overlapped.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ParameterizedThreadStart.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SemaphoreSlim.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SpinWait.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SynchronizationContext.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/TPLETWProvider.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/Task.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/future.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Thread.cs7
-rw-r--r--src/mscorlib/src/System/Threading/ThreadLocal.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ThreadPool.cs1
-rw-r--r--src/mscorlib/src/System/Threading/ThreadStart.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Timer.cs1
-rw-r--r--src/mscorlib/src/System/Threading/WaitHandle.cs1
-rw-r--r--src/mscorlib/src/System/Type.cs1
-rw-r--r--src/mscorlib/src/System/TypeLoadException.cs1
-rw-r--r--src/mscorlib/src/System/TypedReference.cs1
-rw-r--r--src/mscorlib/src/System/WeakReference.cs1
-rw-r--r--src/mscorlib/src/System/__ComObject.cs1
-rw-r--r--src/vm/appdomainnative.cpp5
-rw-r--r--src/vm/appdomainnative.hpp2
-rw-r--r--src/vm/assembly.cpp17
-rw-r--r--src/vm/assembly.hpp3
-rw-r--r--src/vm/comsynchronizable.cpp33
-rw-r--r--src/vm/comsynchronizable.h4
-rw-r--r--src/vm/security.h2
-rw-r--r--src/vm/securitydescriptorassembly.cpp76
-rw-r--r--src/vm/securitydescriptorassembly.h4
192 files changed, 20 insertions, 394 deletions
diff --git a/src/mscorlib/Common/PinnableBufferCache.cs b/src/mscorlib/Common/PinnableBufferCache.cs
index 60c1642ab9..6c85a5a2f6 100644
--- a/src/mscorlib/Common/PinnableBufferCache.cs
+++ b/src/mscorlib/Common/PinnableBufferCache.cs
@@ -11,7 +11,6 @@ using System.Collections.Concurrent;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Diagnostics;
-using System.Security.Permissions;
#if PINNABLEBUFFERCACHE_MSCORLIB
namespace System.Threading
diff --git a/src/mscorlib/src/CleanupToDoList.cs b/src/mscorlib/src/CleanupToDoList.cs
index fe7e81445f..f07d23f8ae 100644
--- a/src/mscorlib/src/CleanupToDoList.cs
+++ b/src/mscorlib/src/CleanupToDoList.cs
@@ -13,24 +13,6 @@ namespace System.Security
CurrentAppDomain = 0,
CurrentAssembly
}
-
- internal sealed class PermissionSet
- {
- }
-}
-
-namespace System.Security.Permissions
-{
- internal class HostProtectionAttribute : Attribute
- {
- public bool MayLeakOnAbort { get; set; }
- }
-
- internal enum PermissionState
- {
- Unrestricted = 1,
- None = 0,
- }
}
namespace System.Security.Policy
@@ -43,10 +25,3 @@ namespace System.Security.Policy
{
}
}
-
-namespace System.Security.Principal
-{
- internal interface IPrincipal
- {
- }
-}
diff --git a/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs b/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
index 4846205b80..52d0e34432 100644
--- a/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
+++ b/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
@@ -9,7 +9,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
namespace Internal.Runtime.Augments
diff --git a/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs b/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
index 839c2ffac5..f82b276059 100644
--- a/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
+++ b/src/mscorlib/src/Microsoft/Win32/RegistryKey.cs
@@ -55,7 +55,6 @@ namespace Microsoft.Win32
using System.Collections;
using System.Collections.Generic;
using System.Security;
- using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.IO;
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.cs
index 219fb77001..89ea22b855 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeFindHandle.cs
@@ -13,7 +13,6 @@
using System;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
index 23631987a5..603558c51a 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
@@ -4,7 +4,6 @@
namespace Microsoft.Win32 {
using Microsoft.Win32.SafeHandles;
- using System.Security.Permissions;
sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid {
internal SafeLibraryHandle() : base(true) {}
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
index ad8918825e..6bf65b01fc 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeRegistryHandle.cs
@@ -11,7 +11,6 @@
namespace Microsoft.Win32.SafeHandles {
using System;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
index 0e57136952..caacc698e7 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
@@ -14,7 +14,6 @@
using System;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
index 08ae0955a8..3d9a9fa062 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/Win32SafeHandles.cs
@@ -18,7 +18,6 @@ namespace Microsoft.Win32.SafeHandles
using System;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
- using System.Security.Permissions;
using System.Runtime.ConstrainedExecution;
// Class of safe handle which uses 0 or -1 as an invalid handle.
diff --git a/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs b/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
index a9b07086ba..a86f7900a7 100644
--- a/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
+++ b/src/mscorlib/src/Microsoft/Win32/UnsafeNativeMethods.cs
@@ -12,7 +12,6 @@ namespace Microsoft.Win32 {
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
- using System.Security.Permissions;
using System.Text;
using System.Diagnostics.Tracing;
diff --git a/src/mscorlib/src/System/Activator.cs b/src/mscorlib/src/System/Activator.cs
index c6cfb16bf4..323fbba9cc 100644
--- a/src/mscorlib/src/System/Activator.cs
+++ b/src/mscorlib/src/System/Activator.cs
@@ -22,7 +22,6 @@ namespace System {
using StackCrawlMark = System.Threading.StackCrawlMark;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
- using System.Security.Permissions;
using AssemblyHashAlgorithm = System.Configuration.Assemblies.AssemblyHashAlgorithm;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/AppDomain.cs b/src/mscorlib/src/System/AppDomain.cs
index 51f4ae0534..e3d2b4bb2b 100644
--- a/src/mscorlib/src/System/AppDomain.cs
+++ b/src/mscorlib/src/System/AppDomain.cs
@@ -20,7 +20,6 @@ namespace System
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Security;
- using System.Security.Permissions;
using System.Security.Policy;
using System.Collections;
using System.Collections.Generic;
diff --git a/src/mscorlib/src/System/ArgumentOutOfRangeException.cs b/src/mscorlib/src/System/ArgumentOutOfRangeException.cs
index 13580e9981..59a8434089 100644
--- a/src/mscorlib/src/System/ArgumentOutOfRangeException.cs
+++ b/src/mscorlib/src/System/ArgumentOutOfRangeException.cs
@@ -17,7 +17,6 @@ namespace System {
using System.Runtime.Remoting;
using System.Runtime.Serialization;
using System.Globalization;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
// The ArgumentOutOfRangeException is thrown when an argument
diff --git a/src/mscorlib/src/System/Array.cs b/src/mscorlib/src/System/Array.cs
index d1ce116235..8694b5a89e 100644
--- a/src/mscorlib/src/System/Array.cs
+++ b/src/mscorlib/src/System/Array.cs
@@ -20,7 +20,6 @@ namespace System {
using System.Runtime.Versioning;
using System.Security;
using System.Diagnostics;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
// Note that we make a T[] (single-dimensional w/ zero as the lower bound) implement both
diff --git a/src/mscorlib/src/System/Attribute.cs b/src/mscorlib/src/System/Attribute.cs
index 796608a216..b44e13f959 100644
--- a/src/mscorlib/src/System/Attribute.cs
+++ b/src/mscorlib/src/System/Attribute.cs
@@ -13,7 +13,6 @@ namespace System {
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Security;
- using System.Security.Permissions;
[Serializable]
[AttributeUsageAttribute(AttributeTargets.All, Inherited = true, AllowMultiple=false)]
diff --git a/src/mscorlib/src/System/BCLDebug.cs b/src/mscorlib/src/System/BCLDebug.cs
index e700f55fa2..7556b85789 100644
--- a/src/mscorlib/src/System/BCLDebug.cs
+++ b/src/mscorlib/src/System/BCLDebug.cs
@@ -20,7 +20,6 @@ namespace System {
using Microsoft.Win32;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
- using System.Security.Permissions;
using System.Security;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/BadImageFormatException.cs b/src/mscorlib/src/System/BadImageFormatException.cs
index e6332b6c51..51a6c40771 100644
--- a/src/mscorlib/src/System/BadImageFormatException.cs
+++ b/src/mscorlib/src/System/BadImageFormatException.cs
@@ -16,7 +16,6 @@ namespace System {
using System;
using System.Runtime.Serialization;
using FileLoadException = System.IO.FileLoadException;
- using System.Security.Permissions;
using SecurityException = System.Security.SecurityException;
using System.Globalization;
diff --git a/src/mscorlib/src/System/Collections/ArrayList.cs b/src/mscorlib/src/System/Collections/ArrayList.cs
index 3eb0160ca2..53746e224e 100644
--- a/src/mscorlib/src/System/Collections/ArrayList.cs
+++ b/src/mscorlib/src/System/Collections/ArrayList.cs
@@ -18,7 +18,6 @@ namespace System.Collections {
using System;
using System.Runtime;
using System.Security;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
diff --git a/src/mscorlib/src/System/Collections/Comparer.cs b/src/mscorlib/src/System/Collections/Comparer.cs
index 7d4a3db549..928b0f9f9a 100644
--- a/src/mscorlib/src/System/Collections/Comparer.cs
+++ b/src/mscorlib/src/System/Collections/Comparer.cs
@@ -17,7 +17,6 @@ namespace System.Collections {
using System;
using System.Globalization;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
[Serializable]
diff --git a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
index e750148838..8b9014a103 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
@@ -24,7 +24,6 @@ using System.Runtime.Serialization;
using System.Text;
using System.Threading;
using System.Security;
-using System.Security.Permissions;
namespace System.Collections.Concurrent
{
diff --git a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
index d0a93e5382..10a5201f6c 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
@@ -20,7 +20,6 @@ using System.Diagnostics.Contracts;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Serialization;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
namespace System.Collections.Concurrent
diff --git a/src/mscorlib/src/System/Collections/Generic/DebugView.cs b/src/mscorlib/src/System/Collections/Generic/DebugView.cs
index d0711e551e..27c5011147 100644
--- a/src/mscorlib/src/System/Collections/Generic/DebugView.cs
+++ b/src/mscorlib/src/System/Collections/Generic/DebugView.cs
@@ -16,7 +16,6 @@
namespace System.Collections.Generic {
using System;
using System.Collections.ObjectModel;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Collections/Generic/Dictionary.cs b/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
index c3970e6824..7b60e31031 100644
--- a/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
+++ b/src/mscorlib/src/System/Collections/Generic/Dictionary.cs
@@ -48,7 +48,6 @@ namespace System.Collections.Generic {
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.Serialization;
- using System.Security.Permissions;
[DebuggerTypeProxy(typeof(Mscorlib_DictionaryDebugView<,>))]
[DebuggerDisplay("Count = {Count}")]
diff --git a/src/mscorlib/src/System/Collections/Generic/List.cs b/src/mscorlib/src/System/Collections/Generic/List.cs
index 17d6e625e8..362e26599d 100644
--- a/src/mscorlib/src/System/Collections/Generic/List.cs
+++ b/src/mscorlib/src/System/Collections/Generic/List.cs
@@ -20,7 +20,6 @@ namespace System.Collections.Generic {
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Collections.ObjectModel;
- using System.Security.Permissions;
// Implements a variable-size List that uses an array of objects to store the
// elements. A List has a capacity, which is the allocated length
diff --git a/src/mscorlib/src/System/Collections/Hashtable.cs b/src/mscorlib/src/System/Collections/Hashtable.cs
index baf59f46f0..3447b99eb4 100644
--- a/src/mscorlib/src/System/Collections/Hashtable.cs
+++ b/src/mscorlib/src/System/Collections/Hashtable.cs
@@ -17,7 +17,6 @@ namespace System.Collections {
using System;
using System.Runtime;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Threading;
using System.Runtime.CompilerServices;
diff --git a/src/mscorlib/src/System/DBNull.cs b/src/mscorlib/src/System/DBNull.cs
index bc04b17650..65c85ba968 100644
--- a/src/mscorlib/src/System/DBNull.cs
+++ b/src/mscorlib/src/System/DBNull.cs
@@ -11,7 +11,6 @@ namespace System {
using System;
using System.Runtime.Remoting;
using System.Runtime.Serialization;
- using System.Security.Permissions;
[Serializable]
public sealed class DBNull : ISerializable, IConvertible {
diff --git a/src/mscorlib/src/System/DateTime.cs b/src/mscorlib/src/System/DateTime.cs
index 1d4618301a..3de50336a9 100644
--- a/src/mscorlib/src/System/DateTime.cs
+++ b/src/mscorlib/src/System/DateTime.cs
@@ -13,7 +13,6 @@ namespace System {
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
using CultureInfo = System.Globalization.CultureInfo;
using Calendar = System.Globalization.Calendar;
diff --git a/src/mscorlib/src/System/DateTimeOffset.cs b/src/mscorlib/src/System/DateTimeOffset.cs
index 5bdaa18aaa..d64ba1582e 100644
--- a/src/mscorlib/src/System/DateTimeOffset.cs
+++ b/src/mscorlib/src/System/DateTimeOffset.cs
@@ -10,7 +10,6 @@ namespace System {
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/DelegateSerializationHolder.cs b/src/mscorlib/src/System/DelegateSerializationHolder.cs
index b48910ba1b..061f92d42e 100644
--- a/src/mscorlib/src/System/DelegateSerializationHolder.cs
+++ b/src/mscorlib/src/System/DelegateSerializationHolder.cs
@@ -7,7 +7,6 @@ using System;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Serialization;
-using System.Security.Permissions;
using System.Globalization;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Diagnostics/Assert.cs b/src/mscorlib/src/System/Diagnostics/Assert.cs
index 75572d7d75..9f4b86b7e4 100644
--- a/src/mscorlib/src/System/Diagnostics/Assert.cs
+++ b/src/mscorlib/src/System/Diagnostics/Assert.cs
@@ -4,7 +4,6 @@
namespace System.Diagnostics {
using System;
- using System.Security.Permissions;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
diff --git a/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs b/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
index e44f9365f1..7fa3e730a4 100644
--- a/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
+++ b/src/mscorlib/src/System/Diagnostics/Contracts/Contracts.cs
@@ -41,7 +41,6 @@ using System.Runtime.ConstrainedExecution;
#endif
#if FEATURE_UNTRUSTED_CALLERS
using System.Security;
-using System.Security.Permissions;
#endif
namespace System.Diagnostics.Contracts {
diff --git a/src/mscorlib/src/System/Diagnostics/Contracts/ContractsBCL.cs b/src/mscorlib/src/System/Diagnostics/Contracts/ContractsBCL.cs
index fe574b98ce..4adf742c44 100644
--- a/src/mscorlib/src/System/Diagnostics/Contracts/ContractsBCL.cs
+++ b/src/mscorlib/src/System/Diagnostics/Contracts/ContractsBCL.cs
@@ -35,7 +35,6 @@ using System.Runtime.ConstrainedExecution;
#endif
#if FEATURE_UNTRUSTED_CALLERS
using System.Security;
-using System.Security.Permissions;
#endif
namespace System.Diagnostics.Contracts {
diff --git a/src/mscorlib/src/System/Diagnostics/Debugger.cs b/src/mscorlib/src/System/Diagnostics/Debugger.cs
index 9be87d180f..21c57dbfaf 100644
--- a/src/mscorlib/src/System/Diagnostics/Debugger.cs
+++ b/src/mscorlib/src/System/Diagnostics/Debugger.cs
@@ -13,7 +13,6 @@ namespace System.Diagnostics
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.Versioning;
// No data, does not need to be marked with the serializable attribute
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/EventDescriptor.cs b/src/mscorlib/src/System/Diagnostics/Eventing/EventDescriptor.cs
index 11b6e6bac2..116b50f86c 100644
--- a/src/mscorlib/src/System/Diagnostics/Eventing/EventDescriptor.cs
+++ b/src/mscorlib/src/System/Diagnostics/Eventing/EventDescriptor.cs
@@ -22,7 +22,9 @@ namespace System.Diagnostics.Tracing
#endif
{
[StructLayout(LayoutKind.Explicit, Size = 16)]
+#if !CORECLR
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
+#endif // CORECLR
internal struct EventDescriptor
{
# region private
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs b/src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs
index af8d9cfbee..1fc18a882a 100644
--- a/src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs
+++ b/src/mscorlib/src/System/Diagnostics/Eventing/EventProvider.cs
@@ -8,7 +8,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
using System;
@@ -43,7 +42,9 @@ namespace System.Diagnostics.Tracing
/// Only here because System.Diagnostics.EventProvider needs one more extensibility hook (when it gets a
/// controller callback)
/// </summary>
+#if !CORECLR
[System.Security.Permissions.HostProtection(MayLeakOnAbort = true)]
+#endif // CORECLR
internal partial class EventProvider : IDisposable
{
// This is the windows EVENT_DATA_DESCRIPTOR structure. We expose it because this is what
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs b/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs
index dcf14d4073..ff1a210b5b 100644
--- a/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs
+++ b/src/mscorlib/src/System/Diagnostics/Eventing/EventSource.cs
@@ -187,7 +187,6 @@ using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Security;
-using System.Security.Permissions;
using System.Text;
using System.Threading;
@@ -3047,7 +3046,7 @@ namespace System.Diagnostics.Tracing
}
if (s_currentPid == 0)
{
-#if ES_BUILD_STANDALONE && !ES_BUILD_PCL
+#if ES_BUILD_STANDALONE && !ES_BUILD_PCL && !CORECLR
// for non-BCL EventSource we must assert SecurityPermission
new SecurityPermission(PermissionState.Unrestricted).Assert();
#endif
diff --git a/src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs b/src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs
index e090c4f106..c4399739a6 100644
--- a/src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs
+++ b/src/mscorlib/src/System/Diagnostics/Eventing/StubEnvironment.cs
@@ -350,7 +350,6 @@ namespace System.Security
}
namespace System.Security.Permissions
{
- class HostProtectionAttribute : Attribute { public bool MayLeakOnAbort { get; set; } }
class PermissionSetAttribute : Attribute
{
public PermissionSetAttribute(System.Security.SecurityAction action) { }
diff --git a/src/mscorlib/src/System/Diagnostics/Stackframe.cs b/src/mscorlib/src/System/Diagnostics/Stackframe.cs
index 10b382f1c9..13d8f5cdcc 100644
--- a/src/mscorlib/src/System/Diagnostics/Stackframe.cs
+++ b/src/mscorlib/src/System/Diagnostics/Stackframe.cs
@@ -8,7 +8,6 @@ namespace System.Diagnostics {
using System;
using System.IO;
using System.Reflection;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
// There is no good reason for the methods of this class to be virtual.
diff --git a/src/mscorlib/src/System/Diagnostics/Stacktrace.cs b/src/mscorlib/src/System/Diagnostics/Stacktrace.cs
index f00f466fd1..cd88f5108f 100644
--- a/src/mscorlib/src/System/Diagnostics/Stacktrace.cs
+++ b/src/mscorlib/src/System/Diagnostics/Stacktrace.cs
@@ -8,7 +8,6 @@ namespace System.Diagnostics {
using System.Text;
using System.Threading;
using System.Security;
- using System.Security.Permissions;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
diff --git a/src/mscorlib/src/System/Diagnostics/log.cs b/src/mscorlib/src/System/Diagnostics/log.cs
index 3a72370e7f..d297b8fa08 100644
--- a/src/mscorlib/src/System/Diagnostics/log.cs
+++ b/src/mscorlib/src/System/Diagnostics/log.cs
@@ -5,7 +5,6 @@
namespace System.Diagnostics {
using System.Runtime.Remoting;
using System;
- using System.Security.Permissions;
using System.IO;
using System.Collections;
using System.Runtime.CompilerServices;
diff --git a/src/mscorlib/src/System/Environment.cs b/src/mscorlib/src/System/Environment.cs
index d082f21534..26346c5c34 100644
--- a/src/mscorlib/src/System/Environment.cs
+++ b/src/mscorlib/src/System/Environment.cs
@@ -18,7 +18,6 @@ namespace System {
using System.Globalization;
using System.Collections;
using System.Collections.Generic;
- using System.Security.Permissions;
using System.Text;
using System.Configuration.Assemblies;
using System.Runtime.InteropServices;
diff --git a/src/mscorlib/src/System/Exception.cs b/src/mscorlib/src/System/Exception.cs
index 231469e9b1..a166c1ab0a 100644
--- a/src/mscorlib/src/System/Exception.cs
+++ b/src/mscorlib/src/System/Exception.cs
@@ -18,7 +18,6 @@ namespace System {
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Diagnostics;
- using System.Security.Permissions;
using System.Security;
using System.IO;
using System.Text;
diff --git a/src/mscorlib/src/System/GC.cs b/src/mscorlib/src/System/GC.cs
index 81fd98cc7e..225fefdeac 100644
--- a/src/mscorlib/src/System/GC.cs
+++ b/src/mscorlib/src/System/GC.cs
@@ -16,7 +16,6 @@ namespace System {
//This class only static members and doesn't require the serializable keyword.
using System;
- using System.Security.Permissions;
using System.Reflection;
using System.Security;
using System.Threading;
diff --git a/src/mscorlib/src/System/Globalization/CompareInfo.cs b/src/mscorlib/src/System/Globalization/CompareInfo.cs
index 2ff830b1ba..6c2230b66b 100644
--- a/src/mscorlib/src/System/Globalization/CompareInfo.cs
+++ b/src/mscorlib/src/System/Globalization/CompareInfo.cs
@@ -29,7 +29,6 @@ namespace System.Globalization {
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Threading;
- using System.Security.Permissions;
using Microsoft.Win32;
using System.Security;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Globalization/CultureInfo.cs b/src/mscorlib/src/System/Globalization/CultureInfo.cs
index 41356c57e4..ba61c146f6 100644
--- a/src/mscorlib/src/System/Globalization/CultureInfo.cs
+++ b/src/mscorlib/src/System/Globalization/CultureInfo.cs
@@ -36,7 +36,6 @@ namespace System.Globalization {
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
- using System.Security.Permissions;
using System.Reflection;
using Microsoft.Win32;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs b/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs
index e615dc394e..b2374ef0b2 100644
--- a/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs
+++ b/src/mscorlib/src/System/Globalization/DateTimeFormatInfo.cs
@@ -10,7 +10,6 @@ namespace System.Globalization {
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
diff --git a/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs b/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
index 0810d67b59..e203223eb0 100644
--- a/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
+++ b/src/mscorlib/src/System/Globalization/GlobalizationAssembly.cs
@@ -10,7 +10,6 @@ namespace System.Globalization {
using System.Collections.Generic;
using System.Threading;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs b/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs
index 18677a9b3e..72331f8346 100644
--- a/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs
+++ b/src/mscorlib/src/System/Globalization/JapaneseCalendar.cs
@@ -8,8 +8,6 @@ namespace System.Globalization {
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using Microsoft.Win32;
- using PermissionSet = System.Security.PermissionSet;
- using System.Security.Permissions;
/*=================================JapaneseCalendar==========================
**
diff --git a/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs b/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs
index bfd51e67cb..d95aac3d3d 100644
--- a/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs
+++ b/src/mscorlib/src/System/Globalization/NumberFormatInfo.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
namespace System.Globalization {
- using System.Security.Permissions;
using System.Runtime.Serialization;
using System.Text;
using System;
diff --git a/src/mscorlib/src/System/Globalization/StringInfo.cs b/src/mscorlib/src/System/Globalization/StringInfo.cs
index b79657b58d..dc32fe9493 100644
--- a/src/mscorlib/src/System/Globalization/StringInfo.cs
+++ b/src/mscorlib/src/System/Globalization/StringInfo.cs
@@ -16,7 +16,6 @@ namespace System.Globalization {
using System;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Globalization/TextInfo.cs b/src/mscorlib/src/System/Globalization/TextInfo.cs
index 2db5effebb..9ece275dd3 100644
--- a/src/mscorlib/src/System/Globalization/TextInfo.cs
+++ b/src/mscorlib/src/System/Globalization/TextInfo.cs
@@ -23,7 +23,6 @@ namespace System.Globalization {
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/IO/Directory.cs b/src/mscorlib/src/System/IO/Directory.cs
index dcdc8506f3..88a669a971 100644
--- a/src/mscorlib/src/System/IO/Directory.cs
+++ b/src/mscorlib/src/System/IO/Directory.cs
@@ -17,7 +17,6 @@
using System.Collections.Generic;
using System.Security;
-using System.Security.Permissions;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
diff --git a/src/mscorlib/src/System/IO/File.cs b/src/mscorlib/src/System/IO/File.cs
index 7c2266a55e..7cc3f431a9 100644
--- a/src/mscorlib/src/System/IO/File.cs
+++ b/src/mscorlib/src/System/IO/File.cs
@@ -14,7 +14,6 @@
**
===========================================================*/
-using System.Security.Permissions;
using Win32Native = Microsoft.Win32.Win32Native;
using System.Runtime.InteropServices;
using System.Security;
diff --git a/src/mscorlib/src/System/IO/FileLoadException.cs b/src/mscorlib/src/System/IO/FileLoadException.cs
index 7bbc1a3b01..980d2514aa 100644
--- a/src/mscorlib/src/System/IO/FileLoadException.cs
+++ b/src/mscorlib/src/System/IO/FileLoadException.cs
@@ -20,7 +20,6 @@ using System.Runtime.Serialization;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.Versioning;
using SecurityException = System.Security.SecurityException;
diff --git a/src/mscorlib/src/System/IO/FileNotFoundException.cs b/src/mscorlib/src/System/IO/FileNotFoundException.cs
index 23531761e3..ad6b5386ba 100644
--- a/src/mscorlib/src/System/IO/FileNotFoundException.cs
+++ b/src/mscorlib/src/System/IO/FileNotFoundException.cs
@@ -16,7 +16,6 @@
using System;
using System.Runtime.Serialization;
-using System.Security.Permissions;
using SecurityException = System.Security.SecurityException;
using System.Globalization;
diff --git a/src/mscorlib/src/System/IO/MemoryStream.cs b/src/mscorlib/src/System/IO/MemoryStream.cs
index afdb21fa4b..05aac909b5 100644
--- a/src/mscorlib/src/System/IO/MemoryStream.cs
+++ b/src/mscorlib/src/System/IO/MemoryStream.cs
@@ -23,7 +23,6 @@ using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Threading;
using System.Threading.Tasks;
-using System.Security.Permissions;
namespace System.IO {
// A MemoryStream represents a Stream in memory (ie, it has no backing store).
diff --git a/src/mscorlib/src/System/IO/Stream.cs b/src/mscorlib/src/System/IO/Stream.cs
index 63c6131c0b..790f0a09ab 100644
--- a/src/mscorlib/src/System/IO/Stream.cs
+++ b/src/mscorlib/src/System/IO/Stream.cs
@@ -23,7 +23,6 @@ using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Security;
-using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Reflection;
diff --git a/src/mscorlib/src/System/IO/StreamReader.cs b/src/mscorlib/src/System/IO/StreamReader.cs
index 8e69196df2..6d50347b1a 100644
--- a/src/mscorlib/src/System/IO/StreamReader.cs
+++ b/src/mscorlib/src/System/IO/StreamReader.cs
@@ -8,7 +8,6 @@ using System.Runtime.Versioning;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
-using System.Security.Permissions;
using System.Threading.Tasks;
namespace System.IO
diff --git a/src/mscorlib/src/System/IO/TextReader.cs b/src/mscorlib/src/System/IO/TextReader.cs
index 0caa6af284..15ba8fba7d 100644
--- a/src/mscorlib/src/System/IO/TextReader.cs
+++ b/src/mscorlib/src/System/IO/TextReader.cs
@@ -17,7 +17,6 @@
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
-using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Threading;
diff --git a/src/mscorlib/src/System/IO/UnmanagedMemoryAccessor.cs b/src/mscorlib/src/System/IO/UnmanagedMemoryAccessor.cs
index 4208ebfb6d..f3fd71833c 100644
--- a/src/mscorlib/src/System/IO/UnmanagedMemoryAccessor.cs
+++ b/src/mscorlib/src/System/IO/UnmanagedMemoryAccessor.cs
@@ -17,7 +17,6 @@ using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
-using System.Security.Permissions;
using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs b/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
index e69a40b285..165b6d2b19 100644
--- a/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
+++ b/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
@@ -17,7 +17,6 @@ using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/IO/UnmanagedMemoryStreamWrapper.cs b/src/mscorlib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
index 040ddbb3d7..99b257ea56 100644
--- a/src/mscorlib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
+++ b/src/mscorlib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
@@ -13,7 +13,6 @@
using System;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Threading;
diff --git a/src/mscorlib/src/System/IO/__Error.cs b/src/mscorlib/src/System/IO/__Error.cs
index 73d90a55a1..955ddbec63 100644
--- a/src/mscorlib/src/System/IO/__Error.cs
+++ b/src/mscorlib/src/System/IO/__Error.cs
@@ -21,7 +21,6 @@ using Win32Native = Microsoft.Win32.Win32Native;
using System.Text;
using System.Globalization;
using System.Security;
-using System.Security.Permissions;
using System.Diagnostics.Contracts;
namespace System.IO {
diff --git a/src/mscorlib/src/System/Lazy.cs b/src/mscorlib/src/System/Lazy.cs
index d9c8ca377c..0ddd6da3a2 100644
--- a/src/mscorlib/src/System/Lazy.cs
+++ b/src/mscorlib/src/System/Lazy.cs
@@ -18,7 +18,6 @@
using System.Runtime;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Threading;
diff --git a/src/mscorlib/src/System/MissingMemberException.cs b/src/mscorlib/src/System/MissingMemberException.cs
index 98246ef0f8..bb9be8827a 100644
--- a/src/mscorlib/src/System/MissingMemberException.cs
+++ b/src/mscorlib/src/System/MissingMemberException.cs
@@ -18,7 +18,6 @@ namespace System {
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
using System.Globalization;
- using System.Security.Permissions;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/OperatingSystem.cs b/src/mscorlib/src/System/OperatingSystem.cs
index 93f6eb8445..a388fc6e33 100644
--- a/src/mscorlib/src/System/OperatingSystem.cs
+++ b/src/mscorlib/src/System/OperatingSystem.cs
@@ -13,7 +13,6 @@
namespace System {
using System.Runtime.Serialization;
using System.Globalization;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Assembly.cs b/src/mscorlib/src/System/Reflection/Assembly.cs
index f1eeaa8744..eaedc6ded4 100644
--- a/src/mscorlib/src/System/Reflection/Assembly.cs
+++ b/src/mscorlib/src/System/Reflection/Assembly.cs
@@ -22,7 +22,6 @@ namespace System.Reflection
using CultureInfo = System.Globalization.CultureInfo;
using System.Security;
using System.Security.Policy;
- using System.Security.Permissions;
using System.IO;
using StringBuilder = System.Text.StringBuilder;
using System.Configuration.Assemblies;
diff --git a/src/mscorlib/src/System/Reflection/AssemblyName.cs b/src/mscorlib/src/System/Reflection/AssemblyName.cs
index 95519556ae..01be855646 100644
--- a/src/mscorlib/src/System/Reflection/AssemblyName.cs
+++ b/src/mscorlib/src/System/Reflection/AssemblyName.cs
@@ -20,7 +20,6 @@ namespace System.Reflection {
using System.Runtime.CompilerServices;
using CultureInfo = System.Globalization.CultureInfo;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/ConstructorInfo.cs b/src/mscorlib/src/System/Reflection/ConstructorInfo.cs
index faddc9e3b4..195ee11ee1 100644
--- a/src/mscorlib/src/System/Reflection/ConstructorInfo.cs
+++ b/src/mscorlib/src/System/Reflection/ConstructorInfo.cs
@@ -16,7 +16,6 @@ namespace System.Reflection
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
- using System.Security.Permissions;
using System.Threading;
using MemberListType = System.RuntimeType.MemberListType;
using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache;
diff --git a/src/mscorlib/src/System/Reflection/CustomAttribute.cs b/src/mscorlib/src/System/Reflection/CustomAttribute.cs
index 4d7692304f..b71c7bbff3 100644
--- a/src/mscorlib/src/System/Reflection/CustomAttribute.cs
+++ b/src/mscorlib/src/System/Reflection/CustomAttribute.cs
@@ -14,7 +14,6 @@ using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
index fa5f1ae8d0..5575e28917 100644
--- a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
@@ -38,7 +38,6 @@ namespace System.Reflection.Emit
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
- using System.Security.Permissions;
using System.Security.Policy;
using System.Threading;
@@ -235,9 +234,6 @@ namespace System.Reflection.Emit
AssemblyBuilderAccess access,
String dir,
Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
ref StackCrawlMark stackMark,
IEnumerable<CustomAttributeBuilder> unsafeAssemblyAttributes,
SecurityContextSource securityContextSource)
@@ -298,9 +294,6 @@ namespace System.Reflection.Emit
name,
evidence,
ref stackMark,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
securityRulesBlob,
aptcaBlob,
access,
@@ -311,10 +304,6 @@ namespace System.Reflection.Emit
name.Name,
access,
dir);
- m_assemblyData.AddPermissionRequests(requiredPermissions,
- optionalPermissions,
- refusedPermissions);
-
#if FEATURE_APPX
if (AppDomain.ProfileAPICheck)
{
@@ -371,7 +360,7 @@ namespace System.Reflection.Emit
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return InternalDefineDynamicAssembly(name, access, null,
- null, null, null, null, ref stackMark, null, SecurityContextSource.CurrentAssembly);
+ null, ref stackMark, null, SecurityContextSource.CurrentAssembly);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
@@ -385,7 +374,7 @@ namespace System.Reflection.Emit
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
return InternalDefineDynamicAssembly(name,
access,
- null, null, null, null, null,
+ null, null,
ref stackMark,
assemblyAttributes, SecurityContextSource.CurrentAssembly);
}
@@ -396,9 +385,6 @@ namespace System.Reflection.Emit
AssemblyName name,
Evidence identity,
ref StackCrawlMark stackMark,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
byte[] securityRulesBlob,
byte[] aptcaBlob,
AssemblyBuilderAccess access,
@@ -412,9 +398,6 @@ namespace System.Reflection.Emit
AssemblyBuilderAccess access,
String dir,
Evidence evidence,
- PermissionSet requiredPermissions,
- PermissionSet optionalPermissions,
- PermissionSet refusedPermissions,
ref StackCrawlMark stackMark,
IEnumerable<CustomAttributeBuilder> unsafeAssemblyAttributes,
SecurityContextSource securityContextSource)
@@ -427,9 +410,6 @@ namespace System.Reflection.Emit
access,
dir,
evidence,
- requiredPermissions,
- optionalPermissions,
- refusedPermissions,
ref stackMark,
unsafeAssemblyAttributes,
securityContextSource);
diff --git a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderData.cs b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderData.cs
index 4e2dee0a66..7ac9daeac0 100644
--- a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderData.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilderData.cs
@@ -125,24 +125,6 @@ namespace System.Reflection.Emit {
// }
}
- // add security permission requests
- internal void AddPermissionRequests(
- PermissionSet required,
- PermissionSet optional,
- PermissionSet refused)
- {
- BCLDebug.Log("DYNIL","## DYNIL LOGGING: AssemblyBuilderData.AddPermissionRequests");
- if (m_isSaved == true)
- {
- // assembly has been saved before!
- throw new InvalidOperationException(Environment.GetResourceString(
- "InvalidOperation_CannotAlterAssembly"));
- }
- m_RequiredPset = required;
- m_OptionalPset = optional;
- m_RefusedPset = refused;
- }
-
internal List<ModuleBuilder> m_moduleBuilderList;
internal List<ResWriterData> m_resWriterList;
internal String m_strAssemblyName;
@@ -158,11 +140,6 @@ namespace System.Reflection.Emit {
// hard coding the assembly def token
internal const int m_tkAssembly = 0x20000001;
-
- // Security permission requests
- internal PermissionSet m_RequiredPset;
- internal PermissionSet m_OptionalPset;
- internal PermissionSet m_RefusedPset;
// tracking AssemblyDef's CAs for persistence to disk
internal CustomAttributeBuilder[] m_CABuilders;
diff --git a/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
index 3bc6a055cb..3bc02860a1 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
@@ -12,7 +12,6 @@ namespace System.Reflection.Emit
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
index da8c7d97cc..5d08ca08f0 100644
--- a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
@@ -19,7 +19,6 @@ namespace System.Reflection.Emit {
using System.Reflection;
using System.IO;
using System.Text;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Globalization;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs b/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs
index f58ca75a6b..cb2667a104 100644
--- a/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/DynamicILGenerator.cs
@@ -14,7 +14,6 @@ namespace System.Reflection.Emit
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
- using System.Security.Permissions;
using System.Threading;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
diff --git a/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs b/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs
index 442311c273..f1d99d3c2c 100644
--- a/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/DynamicMethod.cs
@@ -11,7 +11,6 @@ namespace System.Reflection.Emit
using CultureInfo = System.Globalization.CultureInfo;
using System.Reflection;
using System.Security;
- using System.Security.Permissions;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
@@ -270,7 +269,7 @@ namespace System.Reflection.Emit
AssemblyBuilder assembly = AssemblyBuilder.InternalDefineDynamicAssembly(
assemblyName,
AssemblyBuilderAccess.Run,
- null, null, null, null, null,
+ null, null,
ref stackMark,
assemblyAttributes,
SecurityContextSource.CurrentAssembly);
diff --git a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
index afc82571fd..96564d537b 100644
--- a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
@@ -20,7 +20,6 @@ namespace System.Reflection.Emit {
using System.Reflection;
using System.Runtime.InteropServices;
using CultureInfo = System.Globalization.CultureInfo;
- using System.Security.Permissions;
sealed public class EnumBuilder : TypeInfo
{
diff --git a/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
index bc1d7ea8ec..34c76b93d1 100644
--- a/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/EventToken.cs b/src/mscorlib/src/System/Reflection/Emit/EventToken.cs
index 26054a9997..8ffdce9732 100644
--- a/src/mscorlib/src/System/Reflection/Emit/EventToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/EventToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
[Serializable]
public struct EventToken
{
diff --git a/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
index 27750e3598..5953b67173 100644
--- a/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
@@ -10,7 +10,6 @@ namespace System.Reflection.Emit
using System;
using CultureInfo = System.Globalization.CultureInfo;
using System.Reflection;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
public sealed class FieldBuilder : FieldInfo
diff --git a/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs b/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs
index 02710ad20b..add428f96e 100644
--- a/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/FieldToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
// The FieldToken class is an opaque representation of the Token returned
// by the Metadata to represent the field. FieldTokens are generated by
diff --git a/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs b/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs
index af8faa6ef1..2cee63ff2e 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ILGenerator.cs
@@ -10,7 +10,6 @@ namespace System.Reflection.Emit
using System.Diagnostics.SymbolStore;
using System.Runtime.InteropServices;
using System.Reflection;
- using System.Security.Permissions;
using System.Globalization;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/Label.cs b/src/mscorlib/src/System/Reflection/Emit/Label.cs
index b9a3b3077a..c7b987ff10 100644
--- a/src/mscorlib/src/System/Reflection/Emit/Label.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/Label.cs
@@ -16,7 +16,6 @@
namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
// The Label class is an opaque representation of a label used by the
diff --git a/src/mscorlib/src/System/Reflection/Emit/LocalBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/LocalBuilder.cs
index 2db6e51993..fe4c33160a 100644
--- a/src/mscorlib/src/System/Reflection/Emit/LocalBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/LocalBuilder.cs
@@ -4,7 +4,6 @@
using System;
using System.Reflection;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
diff --git a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
index f718b7b5e2..17c8ce074d 100644
--- a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
@@ -14,7 +14,6 @@ namespace System.Reflection.Emit
using System.Security;
using System.Collections;
using System.Collections.Generic;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs b/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs
index d7361b09e9..76b7279f30 100644
--- a/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/MethodToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
[Serializable]
public struct MethodToken
diff --git a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
index 58608fed41..30e6382550 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
@@ -15,7 +15,6 @@ namespace System.Reflection.Emit
using System.IO;
using System.Resources;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.Serialization;
using System.Text;
using System.Threading;
diff --git a/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs b/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs
index 2e73bda7d6..324fad9ceb 100644
--- a/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/OpCodes.cs
@@ -13,7 +13,6 @@
namespace System.Reflection.Emit {
using System;
-using System.Security.Permissions;
//
// Internal enums for opcode values. Note that the value names are used to construct
diff --git a/src/mscorlib/src/System/Reflection/Emit/Opcode.cs b/src/mscorlib/src/System/Reflection/Emit/Opcode.cs
index 98838f934b..74a9de16b6 100644
--- a/src/mscorlib/src/System/Reflection/Emit/Opcode.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/Opcode.cs
@@ -5,7 +5,6 @@
namespace System.Reflection.Emit {
using System;
using System.Threading;
-using System.Security.Permissions;
using System.Diagnostics.Contracts;
public struct OpCode
diff --git a/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs
index eb6fe174f6..1b3babf595 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ParameterBuilder.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System.Runtime.InteropServices;
using System;
using System.Reflection;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
public class ParameterBuilder
diff --git a/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs b/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs
index 05dc166363..a4a32a51fb 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ParameterToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
// The ParameterToken class is an opaque representation of the Token returned
// by the Metadata to represent the parameter.
diff --git a/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
index cd09a0e03f..7c4ed9dc0f 100644
--- a/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
@@ -17,7 +17,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
using CultureInfo = System.Globalization.CultureInfo;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs b/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs
index 7f23d59092..72ab983bb9 100644
--- a/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/PropertyToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
[Serializable]
public struct PropertyToken {
diff --git a/src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs b/src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs
index dd72bef03b..b43abcb51c 100644
--- a/src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/SignatureHelper.cs
@@ -14,7 +14,6 @@ namespace System.Reflection.Emit
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
- using System.Security.Permissions;
public sealed class SignatureHelper
{
diff --git a/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs b/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs
index 5b8dfbf4f4..5c908b89c7 100644
--- a/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/SignatureToken.cs
@@ -17,7 +17,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
public struct SignatureToken {
diff --git a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs
index 92bec24b96..852225697c 100644
--- a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
- using System.Security.Permissions;
[Serializable]
public struct StringToken {
diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
index 582c95f125..88502cb096 100644
--- a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
@@ -9,7 +9,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Collections.Generic;
diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs b/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs
index a621a47296..4fa851c529 100644
--- a/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/TypeToken.cs
@@ -17,7 +17,6 @@ namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Threading;
- using System.Security.Permissions;
[Serializable]
public struct TypeToken {
diff --git a/src/mscorlib/src/System/Reflection/EventInfo.cs b/src/mscorlib/src/System/Reflection/EventInfo.cs
index 1790b03c2e..f57728b598 100644
--- a/src/mscorlib/src/System/Reflection/EventInfo.cs
+++ b/src/mscorlib/src/System/Reflection/EventInfo.cs
@@ -13,7 +13,6 @@ namespace System.Reflection
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.ConstrainedExecution;
- using System.Security.Permissions;
using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache;
[Serializable]
diff --git a/src/mscorlib/src/System/Reflection/FieldInfo.cs b/src/mscorlib/src/System/Reflection/FieldInfo.cs
index f534e8dd94..ffb9e59ccc 100644
--- a/src/mscorlib/src/System/Reflection/FieldInfo.cs
+++ b/src/mscorlib/src/System/Reflection/FieldInfo.cs
@@ -16,7 +16,6 @@ namespace System.Reflection
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Threading;
using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache;
diff --git a/src/mscorlib/src/System/Reflection/MdImport.cs b/src/mscorlib/src/System/Reflection/MdImport.cs
index dc6b726205..b1d9c5eae8 100644
--- a/src/mscorlib/src/System/Reflection/MdImport.cs
+++ b/src/mscorlib/src/System/Reflection/MdImport.cs
@@ -9,7 +9,6 @@ using System.Reflection;
using System.Globalization;
using System.Threading;
using System.Diagnostics;
-using System.Security.Permissions;
using System.Collections;
using System.Runtime.CompilerServices;
using System.Security;
diff --git a/src/mscorlib/src/System/Reflection/MemberInfo.cs b/src/mscorlib/src/System/Reflection/MemberInfo.cs
index 3466ed29db..5ecbfe06a1 100644
--- a/src/mscorlib/src/System/Reflection/MemberInfo.cs
+++ b/src/mscorlib/src/System/Reflection/MemberInfo.cs
@@ -11,7 +11,6 @@ namespace System.Reflection
using System.Diagnostics.Contracts;
using System.Runtime;
using System.Runtime.InteropServices;
- using System.Security.Permissions;
[Serializable]
public abstract class MemberInfo : ICustomAttributeProvider
diff --git a/src/mscorlib/src/System/Reflection/MethodBase.cs b/src/mscorlib/src/System/Reflection/MethodBase.cs
index 1a666d6d56..3109821ac9 100644
--- a/src/mscorlib/src/System/Reflection/MethodBase.cs
+++ b/src/mscorlib/src/System/Reflection/MethodBase.cs
@@ -11,7 +11,6 @@ namespace System.Reflection
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
- using System.Security.Permissions;
using System.Text;
using System.Threading;
diff --git a/src/mscorlib/src/System/Reflection/MethodInfo.cs b/src/mscorlib/src/System/Reflection/MethodInfo.cs
index af52f5f72e..576a808184 100644
--- a/src/mscorlib/src/System/Reflection/MethodInfo.cs
+++ b/src/mscorlib/src/System/Reflection/MethodInfo.cs
@@ -16,7 +16,6 @@ namespace System.Reflection
using System.Runtime.ConstrainedExecution;
using System.Runtime.Serialization;
using System.Security;
- using System.Security.Permissions;
using System.Text;
using System.Threading;
using MemberListType = System.RuntimeType.MemberListType;
diff --git a/src/mscorlib/src/System/Reflection/Missing.cs b/src/mscorlib/src/System/Reflection/Missing.cs
index a05acdbaca..f62c5b538c 100644
--- a/src/mscorlib/src/System/Reflection/Missing.cs
+++ b/src/mscorlib/src/System/Reflection/Missing.cs
@@ -9,7 +9,6 @@ namespace System.Reflection
using System;
using System.Runtime.Remoting;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
// This is not serializable because it is a reflection command.
diff --git a/src/mscorlib/src/System/Reflection/Module.cs b/src/mscorlib/src/System/Reflection/Module.cs
index 5acaaeb1b8..bdf95fca26 100644
--- a/src/mscorlib/src/System/Reflection/Module.cs
+++ b/src/mscorlib/src/System/Reflection/Module.cs
@@ -17,7 +17,6 @@ namespace System.Reflection
using System.Threading;
using System.Runtime.CompilerServices;
using System.Security;
- using System.Security.Permissions;
using System.IO;
using System.Globalization;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Reflection/ParameterInfo.cs b/src/mscorlib/src/System/Reflection/ParameterInfo.cs
index 107dedc465..fad4402aff 100644
--- a/src/mscorlib/src/System/Reflection/ParameterInfo.cs
+++ b/src/mscorlib/src/System/Reflection/ParameterInfo.cs
@@ -13,7 +13,6 @@ namespace System.Reflection
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
- using System.Security.Permissions;
using System.Threading;
using MdToken = System.Reflection.MetadataToken;
diff --git a/src/mscorlib/src/System/Reflection/PropertyInfo.cs b/src/mscorlib/src/System/Reflection/PropertyInfo.cs
index 330396cb0c..68c15af6c6 100644
--- a/src/mscorlib/src/System/Reflection/PropertyInfo.cs
+++ b/src/mscorlib/src/System/Reflection/PropertyInfo.cs
@@ -15,7 +15,6 @@ namespace System.Reflection
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Text;
using RuntimeTypeCache = System.RuntimeType.RuntimeTypeCache;
diff --git a/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs b/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs
index 7e5d8ec8d3..cccf060645 100644
--- a/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs
+++ b/src/mscorlib/src/System/Reflection/ReflectionTypeLoadException.cs
@@ -19,7 +19,6 @@ namespace System.Reflection {
using System;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
[Serializable]
public sealed class ReflectionTypeLoadException : SystemException, ISerializable {
diff --git a/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs b/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs
index 3350e41a4c..0121982489 100644
--- a/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs
+++ b/src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs
@@ -22,7 +22,6 @@ namespace System.Reflection
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.Versioning;
using Microsoft.Win32;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Resources/ResourceManager.cs b/src/mscorlib/src/System/Resources/ResourceManager.cs
index a03c12cbbd..f17a7c8f8e 100644
--- a/src/mscorlib/src/System/Resources/ResourceManager.cs
+++ b/src/mscorlib/src/System/Resources/ResourceManager.cs
@@ -23,7 +23,6 @@ namespace System.Resources {
using System.Reflection;
using System.Runtime.Serialization;
using System.Security;
- using System.Security.Permissions;
using System.Threading;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
diff --git a/src/mscorlib/src/System/Resources/ResourceReader.cs b/src/mscorlib/src/System/Resources/ResourceReader.cs
index 68feaa279e..d752771020 100644
--- a/src/mscorlib/src/System/Resources/ResourceReader.cs
+++ b/src/mscorlib/src/System/Resources/ResourceReader.cs
@@ -21,7 +21,6 @@ namespace System.Resources {
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
- using System.Security.Permissions;
using System.Security;
using System.Globalization;
using System.Configuration.Assemblies;
diff --git a/src/mscorlib/src/System/Resources/ResourceSet.cs b/src/mscorlib/src/System/Resources/ResourceSet.cs
index d3932ffebf..8fd9346f91 100644
--- a/src/mscorlib/src/System/Resources/ResourceSet.cs
+++ b/src/mscorlib/src/System/Resources/ResourceSet.cs
@@ -17,7 +17,6 @@ namespace System.Resources {
using System.Collections;
using System.IO;
using System.Globalization;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Runtime.Serialization;
diff --git a/src/mscorlib/src/System/RtType.cs b/src/mscorlib/src/System/RtType.cs
index ab551b356d..80f0626910 100644
--- a/src/mscorlib/src/System/RtType.cs
+++ b/src/mscorlib/src/System/RtType.cs
@@ -16,7 +16,6 @@ using System.Runtime.ConstrainedExecution;
using System.Globalization;
using System.Threading;
using System.Diagnostics;
-using System.Security.Permissions;
using System.Collections;
using System.Collections.Generic;
using System.Runtime;
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
index 35ccdac2b6..afb0c22778 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
@@ -18,7 +18,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Runtime.ExceptionServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
using System.Threading.Tasks;
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs
index 926eb6c3cb..198a4ab8e5 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeHelpers.cs
@@ -18,7 +18,6 @@ namespace System.Runtime.CompilerServices {
using System.Runtime.InteropServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Threading;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs
index d2691df6b9..e3b2d2ce62 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/RuntimeWrappedException.cs
@@ -15,7 +15,6 @@ namespace System.Runtime.CompilerServices {
using System;
using System.Runtime.Serialization;
using System.Runtime.Remoting;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
[Serializable]
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
index f8d33eb806..f01900a5bf 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
@@ -44,7 +44,6 @@ using System.Diagnostics.Contracts;
using System.Security;
using System.Threading;
using System.Threading.Tasks;
-using System.Security.Permissions;
using System.Diagnostics.Tracing;
// NOTE: For performance reasons, initialization is not verified. If a developer
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs b/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
index 86789bf12d..92d1b4f95b 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
@@ -28,7 +28,6 @@ using System.Diagnostics.Contracts;
using System.Diagnostics.Tracing;
using System.Threading;
using System.Threading.Tasks;
-using System.Security.Permissions;
namespace System.Runtime.CompilerServices
{
diff --git a/src/mscorlib/src/System/Runtime/GcSettings.cs b/src/mscorlib/src/System/Runtime/GcSettings.cs
index 48e50bf821..713cbd45ed 100644
--- a/src/mscorlib/src/System/Runtime/GcSettings.cs
+++ b/src/mscorlib/src/System/Runtime/GcSettings.cs
@@ -7,7 +7,6 @@ namespace System.Runtime {
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
// These settings are the same format as in clr\src\vm\gcpriv.h
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs b/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs
index a0d48b0c33..d36f8cfa39 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/BStrWrapper.cs
@@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices {
using System;
using System.Security;
- using System.Security.Permissions;
[Serializable]
public sealed class BStrWrapper
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/CriticalHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/CriticalHandle.cs
index 700e059293..a9a7aace17 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/CriticalHandle.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/CriticalHandle.cs
@@ -48,7 +48,6 @@
using System;
using System.Reflection;
using System.Threading;
-using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs b/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs
index 6f2f837607..ccf25af0f9 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/DispatchWrapper.cs
@@ -15,7 +15,6 @@ namespace System.Runtime.InteropServices {
using System;
using System.Security;
- using System.Security.Permissions;
[Serializable]
public sealed class DispatchWrapper
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs b/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs
index 57149ab285..da02893b1e 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/ErrorWrapper.cs
@@ -14,7 +14,6 @@
namespace System.Runtime.InteropServices {
using System;
- using System.Security.Permissions;
[Serializable]
public sealed class ErrorWrapper
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs
index f74c807ebd..3eeb2f1ef7 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/GcHandle.cs
@@ -5,7 +5,6 @@
namespace System.Runtime.InteropServices
{
using System;
- using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/IException.cs b/src/mscorlib/src/System/Runtime/InteropServices/IException.cs
index 1d3d94301b..895aa54781 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/IException.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/IException.cs
@@ -17,7 +17,6 @@ namespace System.Runtime.InteropServices {
using System;
using System.Reflection;
using System.Runtime.Serialization;
- using System.Security.Permissions;
[GuidAttribute("b36b5c63-42ef-38bc-a07e-0b34c98f164a")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs b/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs
index 7d8b20e5ac..2f4ddf46d0 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/Marshal.cs
@@ -19,7 +19,6 @@ namespace System.Runtime.InteropServices
using System.Reflection;
using System.Reflection.Emit;
using System.Security;
- using System.Security.Permissions;
using System.Text;
using System.Threading;
using System.Runtime.Remoting;
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs b/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs
index 25678b365e..28abe0cb3b 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/RuntimeEnvironment.cs
@@ -17,7 +17,6 @@ using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using System.Reflection;
using Microsoft.Win32;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeBuffer.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeBuffer.cs
index eba67ae74e..0f914fb771 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/SafeBuffer.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeBuffer.cs
@@ -69,7 +69,6 @@
namespace System.Runtime.InteropServices
{
using System;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
index ed9910e4e4..733ddfe7ff 100644
--- a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
+++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs
@@ -19,7 +19,6 @@ namespace System.Runtime.InteropServices {
using System;
using System.Reflection;
using System.Threading;
-using System.Security.Permissions;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.IO;
diff --git a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
index 3d3a42caab..9f9d819129 100644
--- a/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
+++ b/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs
@@ -20,7 +20,6 @@ using System.Runtime.InteropServices;
using System.Threading;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
-using System.Security.Permissions;
using System.Runtime.Versioning;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs b/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs
index 032f0d8a37..56a4189abd 100644
--- a/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs
+++ b/src/mscorlib/src/System/Runtime/Reliability/CriticalFinalizerObject.cs
@@ -17,7 +17,6 @@
===========================================================*/
using System;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
namespace System.Runtime.ConstrainedExecution
diff --git a/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs b/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs
index a9425f7871..c3f9eb4452 100644
--- a/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs
+++ b/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs
@@ -18,7 +18,6 @@ namespace System.Runtime.Serialization {
using System.Collections;
using System.Collections.Generic;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.Remoting;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs b/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs
index c863747365..ef5ee6ade0 100644
--- a/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs
+++ b/src/mscorlib/src/System/Runtime/Serialization/IObjectReference.cs
@@ -18,7 +18,6 @@
namespace System.Runtime.Serialization {
using System;
- using System.Security.Permissions;
// Interface does not need to be marked with the serializable attribute
public interface IObjectReference {
Object GetRealObject(StreamingContext context);
diff --git a/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs b/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs
index 9791b4ec9d..816aa0484b 100644
--- a/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs
+++ b/src/mscorlib/src/System/Runtime/Serialization/ISerializable.cs
@@ -16,7 +16,6 @@
namespace System.Runtime.Serialization {
using System.Runtime.Remoting;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System;
using System.Reflection;
diff --git a/src/mscorlib/src/System/RuntimeHandles.cs b/src/mscorlib/src/System/RuntimeHandles.cs
index 6074095299..504f3acfe6 100644
--- a/src/mscorlib/src/System/RuntimeHandles.cs
+++ b/src/mscorlib/src/System/RuntimeHandles.cs
@@ -19,7 +19,6 @@ namespace System
using System.Text;
using System.Globalization;
using System.Security;
- using System.Security.Permissions;
using Microsoft.Win32.SafeHandles;
using System.Diagnostics.Contracts;
using StackCrawlMark = System.Threading.StackCrawlMark;
diff --git a/src/mscorlib/src/System/Security/SecurityException.cs b/src/mscorlib/src/System/Security/SecurityException.cs
index 57ac999f65..8811be82ff 100644
--- a/src/mscorlib/src/System/Security/SecurityException.cs
+++ b/src/mscorlib/src/System/Security/SecurityException.cs
@@ -18,7 +18,6 @@ namespace System.Security
using System.Security;
using System;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Reflection;
using System.Text;
using System.Security.Policy;
@@ -35,7 +34,7 @@ namespace System.Security
}
#pragma warning disable 618
- internal static Exception MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, Object demand)
+ internal static Exception MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, RuntimeMethodHandleInternal rmh, Object demand)
#pragma warning restore 618
{
return new SecurityException(GetResString("Arg_SecurityException"));
diff --git a/src/mscorlib/src/System/Security/SecurityState.cs b/src/mscorlib/src/System/Security/SecurityState.cs
index 3c7f8bf49f..55dcce07c0 100644
--- a/src/mscorlib/src/System/Security/SecurityState.cs
+++ b/src/mscorlib/src/System/Security/SecurityState.cs
@@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Security;
-using System.Security.Permissions;
namespace System.Security
{
diff --git a/src/mscorlib/src/System/Text/ASCIIEncoding.cs b/src/mscorlib/src/System/Text/ASCIIEncoding.cs
index 9226bb2940..07b7f3e890 100644
--- a/src/mscorlib/src/System/Text/ASCIIEncoding.cs
+++ b/src/mscorlib/src/System/Text/ASCIIEncoding.cs
@@ -6,7 +6,6 @@ namespace System.Text
{
using System;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Text/DecoderNLS.cs b/src/mscorlib/src/System/Text/DecoderNLS.cs
index 24a521feb8..79474f8d8c 100644
--- a/src/mscorlib/src/System/Text/DecoderNLS.cs
+++ b/src/mscorlib/src/System/Text/DecoderNLS.cs
@@ -5,7 +5,6 @@
namespace System.Text
{
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Text;
using System;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Text/EncoderNLS.cs b/src/mscorlib/src/System/Text/EncoderNLS.cs
index 455654004f..95901e01f4 100644
--- a/src/mscorlib/src/System/Text/EncoderNLS.cs
+++ b/src/mscorlib/src/System/Text/EncoderNLS.cs
@@ -5,7 +5,6 @@
namespace System.Text
{
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Text;
using System;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Text/Encoding.cs b/src/mscorlib/src/System/Text/Encoding.cs
index fdc093a77b..8cb01e41fa 100644
--- a/src/mscorlib/src/System/Text/Encoding.cs
+++ b/src/mscorlib/src/System/Text/Encoding.cs
@@ -12,7 +12,6 @@ namespace System.Text
using System.Runtime.Serialization;
using System.Globalization;
using System.Security;
- using System.Security.Permissions;
using System.Threading;
using System.Text;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Text/Latin1Encoding.cs b/src/mscorlib/src/System/Text/Latin1Encoding.cs
index 8fe8f898b2..26009bf6c0 100644
--- a/src/mscorlib/src/System/Text/Latin1Encoding.cs
+++ b/src/mscorlib/src/System/Text/Latin1Encoding.cs
@@ -13,7 +13,6 @@ namespace System.Text
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
- using System.Security.Permissions;
//
diff --git a/src/mscorlib/src/System/Text/UTF7Encoding.cs b/src/mscorlib/src/System/Text/UTF7Encoding.cs
index 0626625430..9418d2e768 100644
--- a/src/mscorlib/src/System/Text/UTF7Encoding.cs
+++ b/src/mscorlib/src/System/Text/UTF7Encoding.cs
@@ -10,7 +10,6 @@ namespace System.Text
{
using System;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Text/UTF8Encoding.cs b/src/mscorlib/src/System/Text/UTF8Encoding.cs
index 58ab4f746b..191bbfef56 100644
--- a/src/mscorlib/src/System/Text/UTF8Encoding.cs
+++ b/src/mscorlib/src/System/Text/UTF8Encoding.cs
@@ -20,7 +20,6 @@ namespace System.Text
using System;
using System.Globalization;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Text/UnicodeEncoding.cs b/src/mscorlib/src/System/Text/UnicodeEncoding.cs
index 3b95ab367f..d8ef18ab05 100644
--- a/src/mscorlib/src/System/Text/UnicodeEncoding.cs
+++ b/src/mscorlib/src/System/Text/UnicodeEncoding.cs
@@ -11,7 +11,6 @@ namespace System.Text
using System;
using System.Globalization;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/AutoResetEvent.cs b/src/mscorlib/src/System/Threading/AutoResetEvent.cs
index 8a27860316..fc6b2301ca 100644
--- a/src/mscorlib/src/System/Threading/AutoResetEvent.cs
+++ b/src/mscorlib/src/System/Threading/AutoResetEvent.cs
@@ -14,7 +14,6 @@
namespace System.Threading {
using System;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
public sealed class AutoResetEvent : EventWaitHandle
diff --git a/src/mscorlib/src/System/Threading/CancellationToken.cs b/src/mscorlib/src/System/Threading/CancellationToken.cs
index d22c3afd3d..b68ba4c046 100644
--- a/src/mscorlib/src/System/Threading/CancellationToken.cs
+++ b/src/mscorlib/src/System/Threading/CancellationToken.cs
@@ -9,7 +9,6 @@
using System;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime;
diff --git a/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs b/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
index ac27fe30e6..89e98fa3c8 100644
--- a/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
+++ b/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
@@ -6,7 +6,6 @@
////////////////////////////////////////////////////////////////////////////////
using System.Diagnostics.Contracts;
-using System.Security.Permissions;
using System.Runtime.CompilerServices;
namespace System.Threading
diff --git a/src/mscorlib/src/System/Threading/CancellationTokenSource.cs b/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
index 7b9aa85658..1e70d6f30f 100644
--- a/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
+++ b/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
@@ -10,7 +10,6 @@ using System;
using System.Security;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime;
diff --git a/src/mscorlib/src/System/Threading/CountdownEvent.cs b/src/mscorlib/src/System/Threading/CountdownEvent.cs
index a62c296cca..af055e347e 100644
--- a/src/mscorlib/src/System/Threading/CountdownEvent.cs
+++ b/src/mscorlib/src/System/Threading/CountdownEvent.cs
@@ -11,7 +11,6 @@
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
using System;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Threading;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Threading/EventWaitHandle.cs b/src/mscorlib/src/System/Threading/EventWaitHandle.cs
index 7e2df04c8b..0268948a5c 100644
--- a/src/mscorlib/src/System/Threading/EventWaitHandle.cs
+++ b/src/mscorlib/src/System/Threading/EventWaitHandle.cs
@@ -28,7 +28,6 @@ namespace System.Threading
using System;
using System.Threading;
using System.Runtime.CompilerServices;
- using System.Security.Permissions;
using System.IO;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
diff --git a/src/mscorlib/src/System/Threading/ExecutionContext.cs b/src/mscorlib/src/System/Threading/ExecutionContext.cs
index d063af7202..47a55a3bb9 100644
--- a/src/mscorlib/src/System/Threading/ExecutionContext.cs
+++ b/src/mscorlib/src/System/Threading/ExecutionContext.cs
@@ -19,7 +19,6 @@ namespace System.Threading
using System.Reflection;
using System.Runtime.ExceptionServices;
using System.Runtime.Serialization;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
diff --git a/src/mscorlib/src/System/Threading/Interlocked.cs b/src/mscorlib/src/System/Threading/Interlocked.cs
index 53b2264ad7..70e6b45b91 100644
--- a/src/mscorlib/src/System/Threading/Interlocked.cs
+++ b/src/mscorlib/src/System/Threading/Interlocked.cs
@@ -6,7 +6,6 @@
namespace System.Threading
{
using System;
- using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/Threading/LazyInitializer.cs b/src/mscorlib/src/System/Threading/LazyInitializer.cs
index 238cc89dbd..af32673d03 100644
--- a/src/mscorlib/src/System/Threading/LazyInitializer.cs
+++ b/src/mscorlib/src/System/Threading/LazyInitializer.cs
@@ -11,7 +11,6 @@
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
namespace System.Threading
diff --git a/src/mscorlib/src/System/Threading/ManualResetEvent.cs b/src/mscorlib/src/System/Threading/ManualResetEvent.cs
index a4d5f5e0cb..a8e012fb43 100644
--- a/src/mscorlib/src/System/Threading/ManualResetEvent.cs
+++ b/src/mscorlib/src/System/Threading/ManualResetEvent.cs
@@ -14,7 +14,6 @@
namespace System.Threading {
using System;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
public sealed class ManualResetEvent : EventWaitHandle
diff --git a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
index ed44e80b50..2d57b4102b 100644
--- a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
+++ b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
@@ -13,7 +13,6 @@
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
using System;
-using System.Security.Permissions;
using System.Threading;
using System.Runtime.InteropServices;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Threading/Monitor.cs b/src/mscorlib/src/System/Threading/Monitor.cs
index 27f62966d4..af96336209 100644
--- a/src/mscorlib/src/System/Threading/Monitor.cs
+++ b/src/mscorlib/src/System/Threading/Monitor.cs
@@ -17,7 +17,6 @@
namespace System.Threading {
using System;
- using System.Security.Permissions;
using System.Runtime;
using System.Runtime.Remoting;
using System.Threading;
diff --git a/src/mscorlib/src/System/Threading/Mutex.cs b/src/mscorlib/src/System/Threading/Mutex.cs
index bf1730cc60..68b76857d5 100644
--- a/src/mscorlib/src/System/Threading/Mutex.cs
+++ b/src/mscorlib/src/System/Threading/Mutex.cs
@@ -16,7 +16,6 @@ namespace System.Threading
using System;
using System.Threading;
using System.Runtime.CompilerServices;
- using System.Security.Permissions;
using System.IO;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
diff --git a/src/mscorlib/src/System/Threading/Overlapped.cs b/src/mscorlib/src/System/Threading/Overlapped.cs
index 92b40744b5..d3caff5e74 100644
--- a/src/mscorlib/src/System/Threading/Overlapped.cs
+++ b/src/mscorlib/src/System/Threading/Overlapped.cs
@@ -31,7 +31,6 @@ namespace System.Threading
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.ConstrainedExecution;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/ParameterizedThreadStart.cs b/src/mscorlib/src/System/Threading/ParameterizedThreadStart.cs
index 45d24fef49..32b63153c4 100644
--- a/src/mscorlib/src/System/Threading/ParameterizedThreadStart.cs
+++ b/src/mscorlib/src/System/Threading/ParameterizedThreadStart.cs
@@ -15,7 +15,6 @@
namespace System.Threading {
- using System.Security.Permissions;
using System.Threading;
using System.Runtime.InteropServices;
diff --git a/src/mscorlib/src/System/Threading/SemaphoreSlim.cs b/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
index 0477dcfec1..c3b43d9585 100644
--- a/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
+++ b/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
@@ -16,7 +16,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
using System.Threading.Tasks;
diff --git a/src/mscorlib/src/System/Threading/SpinWait.cs b/src/mscorlib/src/System/Threading/SpinWait.cs
index 1b31407e0f..8431f6564f 100644
--- a/src/mscorlib/src/System/Threading/SpinWait.cs
+++ b/src/mscorlib/src/System/Threading/SpinWait.cs
@@ -12,7 +12,6 @@
using System;
using System.Runtime.ConstrainedExecution;
-using System.Security.Permissions;
using System.Threading;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/SynchronizationContext.cs b/src/mscorlib/src/System/Threading/SynchronizationContext.cs
index d96525c03f..20d56ba84c 100644
--- a/src/mscorlib/src/System/Threading/SynchronizationContext.cs
+++ b/src/mscorlib/src/System/Threading/SynchronizationContext.cs
@@ -13,7 +13,6 @@
namespace System.Threading
{
using Microsoft.Win32.SafeHandles;
- using System.Security.Permissions;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
diff --git a/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index c7a96b0394..a87406a493 100644
--- a/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -20,7 +20,6 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Security;
-using System.Security.Permissions;
namespace System.Threading.Tasks
{
diff --git a/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs b/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
index 4d72270399..137afa11f5 100644
--- a/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
@@ -12,7 +12,6 @@
using System;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Threading/Tasks/TPLETWProvider.cs b/src/mscorlib/src/System/Threading/Tasks/TPLETWProvider.cs
index c14fb2953c..12cc1daa63 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TPLETWProvider.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TPLETWProvider.cs
@@ -14,7 +14,6 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.CompilerServices;
namespace System.Threading.Tasks
diff --git a/src/mscorlib/src/System/Threading/Tasks/Task.cs b/src/mscorlib/src/System/Threading/Tasks/Task.cs
index 82864aa7ba..7013c5c5e0 100644
--- a/src/mscorlib/src/System/Threading/Tasks/Task.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/Task.cs
@@ -18,7 +18,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.ExceptionServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs b/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
index c2a63eed6b..bf9f9cbb2c 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
@@ -17,7 +17,6 @@ using System.Diagnostics.Contracts;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
-using System.Security.Permissions;
using System.Threading;
// Disable the "reference to volatile field not treated as volatile" error.
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs b/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
index 417a6bb0bc..89ba2988ca 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
@@ -15,7 +15,6 @@
using System;
using System.Collections.Generic;
using System.Security;
-using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs b/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
index fad3fc06c5..d68c3fedc4 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
@@ -16,7 +16,6 @@ using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using System.Security;
-using System.Security.Permissions;
using System.Collections.Concurrent;
using System.Diagnostics.Contracts;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/Threading/Tasks/future.cs b/src/mscorlib/src/System/Threading/Tasks/future.cs
index 94a980b86a..15136f12bf 100644
--- a/src/mscorlib/src/System/Threading/Tasks/future.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/future.cs
@@ -16,7 +16,6 @@ using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Security;
-using System.Security.Permissions;
using System.Threading;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/Thread.cs b/src/mscorlib/src/System/Threading/Thread.cs
index 3ac9a55a0c..319ae1c623 100644
--- a/src/mscorlib/src/System/Threading/Thread.cs
+++ b/src/mscorlib/src/System/Threading/Thread.cs
@@ -19,8 +19,6 @@ namespace System.Threading {
using System.Runtime;
using System.Runtime.InteropServices;
using System;
- using System.Security.Permissions;
- using System.Security.Principal;
using System.Globalization;
using System.Collections.Generic;
using System.Runtime.Serialization;
@@ -283,8 +281,7 @@ namespace System.Threading {
t.SetExecutionContextHelper(ec);
}
- IPrincipal principal = null;
- StartInternal(principal, ref stackMark);
+ StartInternal(ref stackMark);
}
internal ExecutionContext ExecutionContext
@@ -300,7 +297,7 @@ namespace System.Threading {
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern void StartInternal(IPrincipal principal, ref StackCrawlMark stackMark);
+ private extern void StartInternal(ref StackCrawlMark stackMark);
// Helper method to get a logical thread ID for StringBuilder (for
diff --git a/src/mscorlib/src/System/Threading/ThreadLocal.cs b/src/mscorlib/src/System/Threading/ThreadLocal.cs
index 2b996cb34d..eedf6d0c81 100644
--- a/src/mscorlib/src/System/Threading/ThreadLocal.cs
+++ b/src/mscorlib/src/System/Threading/ThreadLocal.cs
@@ -16,7 +16,6 @@
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
using System.Collections.Generic;
-using System.Security.Permissions;
using System.Diagnostics;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/Threading/ThreadPool.cs b/src/mscorlib/src/System/Threading/ThreadPool.cs
index eb3f20bc78..1002aa0442 100644
--- a/src/mscorlib/src/System/Threading/ThreadPool.cs
+++ b/src/mscorlib/src/System/Threading/ThreadPool.cs
@@ -21,7 +21,6 @@ using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
-using System.Security.Permissions;
using Microsoft.Win32;
namespace System.Threading
diff --git a/src/mscorlib/src/System/Threading/ThreadStart.cs b/src/mscorlib/src/System/Threading/ThreadStart.cs
index d288c47d69..e4beddcd75 100644
--- a/src/mscorlib/src/System/Threading/ThreadStart.cs
+++ b/src/mscorlib/src/System/Threading/ThreadStart.cs
@@ -14,7 +14,6 @@
=============================================================================*/
namespace System.Threading {
- using System.Security.Permissions;
using System.Threading;
// Define the delegate
diff --git a/src/mscorlib/src/System/Threading/Timer.cs b/src/mscorlib/src/System/Threading/Timer.cs
index d4971537aa..c874b08880 100644
--- a/src/mscorlib/src/System/Threading/Timer.cs
+++ b/src/mscorlib/src/System/Threading/Timer.cs
@@ -8,7 +8,6 @@ namespace System.Threading
{
using System;
using System.Security;
- using System.Security.Permissions;
using Microsoft.Win32;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
diff --git a/src/mscorlib/src/System/Threading/WaitHandle.cs b/src/mscorlib/src/System/Threading/WaitHandle.cs
index 9f15d5847f..668ded30a7 100644
--- a/src/mscorlib/src/System/Threading/WaitHandle.cs
+++ b/src/mscorlib/src/System/Threading/WaitHandle.cs
@@ -17,7 +17,6 @@ namespace System.Threading
using System.Threading;
using System.Runtime.Remoting;
using System;
- using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
diff --git a/src/mscorlib/src/System/Type.cs b/src/mscorlib/src/System/Type.cs
index fcb8435d4c..3647451445 100644
--- a/src/mscorlib/src/System/Type.cs
+++ b/src/mscorlib/src/System/Type.cs
@@ -19,7 +19,6 @@ namespace System
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Security;
- using System.Security.Permissions;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Versioning;
diff --git a/src/mscorlib/src/System/TypeLoadException.cs b/src/mscorlib/src/System/TypeLoadException.cs
index 8145a3a996..7bc3a1bcce 100644
--- a/src/mscorlib/src/System/TypeLoadException.cs
+++ b/src/mscorlib/src/System/TypeLoadException.cs
@@ -20,7 +20,6 @@ namespace System {
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
- using System.Security.Permissions;
using System.Diagnostics.Contracts;
[Serializable]
diff --git a/src/mscorlib/src/System/TypedReference.cs b/src/mscorlib/src/System/TypedReference.cs
index c3bc47d9f4..5e8f3c4c04 100644
--- a/src/mscorlib/src/System/TypedReference.cs
+++ b/src/mscorlib/src/System/TypedReference.cs
@@ -11,7 +11,6 @@ namespace System {
using System.Runtime.CompilerServices;
using CultureInfo = System.Globalization.CultureInfo;
using FieldInfo = System.Reflection.FieldInfo;
- using System.Security.Permissions;
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
diff --git a/src/mscorlib/src/System/WeakReference.cs b/src/mscorlib/src/System/WeakReference.cs
index 0da8876515..6600d15855 100644
--- a/src/mscorlib/src/System/WeakReference.cs
+++ b/src/mscorlib/src/System/WeakReference.cs
@@ -13,7 +13,6 @@ namespace System {
using System;
using System.Runtime.Serialization;
using System.Security;
- using System.Security.Permissions;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Diagnostics;
diff --git a/src/mscorlib/src/System/__ComObject.cs b/src/mscorlib/src/System/__ComObject.cs
index 5bb5a2e7d1..86800a51f8 100644
--- a/src/mscorlib/src/System/__ComObject.cs
+++ b/src/mscorlib/src/System/__ComObject.cs
@@ -21,7 +21,6 @@ namespace System
using System.Runtime.InteropServices.WindowsRuntime;
using System.Runtime.CompilerServices;
using System.Reflection;
- using System.Security.Permissions;
internal class __ComObject : MarshalByRefObject
{
diff --git a/src/vm/appdomainnative.cpp b/src/vm/appdomainnative.cpp
index 85c828f9ca..3935cb5b54 100644
--- a/src/vm/appdomainnative.cpp
+++ b/src/vm/appdomainnative.cpp
@@ -580,7 +580,7 @@ void QCALLTYPE AppDomainNative::SetupBindingPaths(__in_z LPCWSTR wszTrustedPlatf
#endif // FEATURE_VERSIONING
-FCIMPL12(Object*, AppDomainNative::CreateDynamicAssembly, AppDomainBaseObject* refThisUNSAFE, AssemblyNameBaseObject* assemblyNameUNSAFE, Object* identityUNSAFE, StackCrawlMark* stackMark, Object* requiredPsetUNSAFE, Object* optionalPsetUNSAFE, Object* refusedPsetUNSAFE, U1Array *securityRulesBlobUNSAFE, U1Array *aptcaBlobUNSAFE, INT32 access, INT32 dwFlags, SecurityContextSource securityContextSource)
+FCIMPL9(Object*, AppDomainNative::CreateDynamicAssembly, AppDomainBaseObject* refThisUNSAFE, AssemblyNameBaseObject* assemblyNameUNSAFE, Object* identityUNSAFE, StackCrawlMark* stackMark, U1Array *securityRulesBlobUNSAFE, U1Array *aptcaBlobUNSAFE, INT32 access, INT32 dwFlags, SecurityContextSource securityContextSource)
{
FCALL_CONTRACT;
@@ -594,9 +594,6 @@ FCIMPL12(Object*, AppDomainNative::CreateDynamicAssembly, AppDomainBaseObject* r
args.refThis = (APPDOMAINREF) refThisUNSAFE;
args.assemblyName = (ASSEMBLYNAMEREF) assemblyNameUNSAFE;
args.identity = (OBJECTREF) identityUNSAFE;
- args.requiredPset = (OBJECTREF) requiredPsetUNSAFE;
- args.optionalPset = (OBJECTREF) optionalPsetUNSAFE;
- args.refusedPset = (OBJECTREF) refusedPsetUNSAFE;
args.securityRulesBlob = (U1ARRAYREF) securityRulesBlobUNSAFE;
args.aptcaBlob = (U1ARRAYREF) aptcaBlobUNSAFE;
args.loaderAllocator = NULL;
diff --git a/src/vm/appdomainnative.hpp b/src/vm/appdomainnative.hpp
index 5aa781ba41..cb0c364cfa 100644
--- a/src/vm/appdomainnative.hpp
+++ b/src/vm/appdomainnative.hpp
@@ -34,7 +34,7 @@ public:
static FCDECL2(void, UpdateLoaderOptimization, AppDomainBaseObject* refThisUNSAFE, DWORD optimization);
#endif // FEATURE_LOADER_OPTIMIZATION
- static FCDECL12(Object*, CreateDynamicAssembly, AppDomainBaseObject* refThisUNSAFE, AssemblyNameBaseObject* assemblyNameUNSAFE, Object* identityUNSAFE, StackCrawlMark* stackMark, Object* requiredPsetUNSAFE, Object* optionalPsetUNSAFE, Object* refusedPsetUNSAFE, U1Array* securityRulesBlobUNSAFE, U1Array* aptcaBlobUNSAFE, INT32 access, INT32 flags, SecurityContextSource securityContextSource);
+ static FCDECL9(Object*, CreateDynamicAssembly, AppDomainBaseObject* refThisUNSAFE, AssemblyNameBaseObject* assemblyNameUNSAFE, Object* identityUNSAFE, StackCrawlMark* stackMark, U1Array* securityRulesBlobUNSAFE, U1Array* aptcaBlobUNSAFE, INT32 access, INT32 flags, SecurityContextSource securityContextSource);
#ifdef FEATURE_APPDOMAINMANAGER_INITOPTIONS
static FCDECL0(FC_BOOL_RET, HasHost);
#endif // FEATURE_APPDOMAINMANAGER_INITOPTIONS
diff --git a/src/vm/assembly.cpp b/src/vm/assembly.cpp
index b3e7611205..2db3e23fff 100644
--- a/src/vm/assembly.cpp
+++ b/src/vm/assembly.cpp
@@ -924,23 +924,6 @@ Assembly *Assembly::CreateDynamic(AppDomain *pDomain, CreateDynamicAssemblyArgs
}
// Start loading process
-
-#ifdef FEATURE_CAS_POLICY
- // Get the security descriptor for the assembly.
- IAssemblySecurityDescriptor *pSecDesc = pDomainAssembly->GetSecurityDescriptor();
-
- // Propagate identity and permission request information into the assembly's
- // security descriptor. Then when policy is resolved we'll end up with the
- // correct grant set.
- // If identity has not been provided then the caller's assembly will be
- // calculated instead and we'll just copy the granted permissions from the
- // caller to the new assembly and mark policy as resolved (done
- // automatically by SetGrantedPermissionSet).
- pSecDesc->SetRequestedPermissionSet(args->requiredPset,
- args->optionalPset,
- args->refusedPset);
-#endif // FEATURE_CAS_POLICY
-
{
// Create a concrete assembly
// (!Do not remove scoping brace: order is important here: the Assembly holder must destruct before the AllocMemTracker!)
diff --git a/src/vm/assembly.hpp b/src/vm/assembly.hpp
index bcd36b9a5f..54bb03de96 100644
--- a/src/vm/assembly.hpp
+++ b/src/vm/assembly.hpp
@@ -73,9 +73,6 @@ enum DynamicAssemblyFlags
struct CreateDynamicAssemblyArgsGC
{
APPDOMAINREF refThis;
- OBJECTREF refusedPset;
- OBJECTREF optionalPset;
- OBJECTREF requiredPset;
OBJECTREF identity;
ASSEMBLYNAMEREF assemblyName;
U1ARRAYREF securityRulesBlob;
diff --git a/src/vm/comsynchronizable.cpp b/src/vm/comsynchronizable.cpp
index aa8b1596f9..b486687752 100644
--- a/src/vm/comsynchronizable.cpp
+++ b/src/vm/comsynchronizable.cpp
@@ -52,9 +52,8 @@ struct SharedState
OBJECTHANDLE m_Threadable;
OBJECTHANDLE m_ThreadStartArg;
Thread *m_Internal;
- OBJECTHANDLE m_Principal;
- SharedState(OBJECTREF threadable, OBJECTREF threadStartArg, Thread *internal, OBJECTREF principal)
+ SharedState(OBJECTREF threadable, OBJECTREF threadStartArg, Thread *internal)
{
CONTRACTL
{
@@ -71,8 +70,6 @@ struct SharedState
m_ThreadStartArg = ad->CreateHandle(threadStartArg);
m_Internal = internal;
-
- m_Principal = ad->CreateHandle(principal);
}
~SharedState()
@@ -95,7 +92,6 @@ struct SharedState
{
DestroyHandle(m_Threadable);
DestroyHandle(m_ThreadStartArg);
- DestroyHandle(m_Principal);
}
}
};
@@ -230,7 +226,6 @@ void ThreadNative::KickOffThread_Worker(LPVOID ptr)
// we are saving the delagate and result primarily for debugging
struct _gc
{
- OBJECTREF orPrincipal;
OBJECTREF orThreadStartArg;
OBJECTREF orDelegate;
OBJECTREF orResult;
@@ -244,22 +239,6 @@ void ThreadNative::KickOffThread_Worker(LPVOID ptr)
GCPROTECT_BEGIN(gc);
BEGIN_SO_INTOLERANT_CODE(pThread);
- gc.orPrincipal = ObjectFromHandle(args->share->m_Principal);
-
-#ifdef FEATURE_IMPERSONATION
- // Push the initial security principal object (if any) onto the
- // managed thread.
- if (gc.orPrincipal != NULL)
- {
- gc.orThread = args->pThread->GetExposedObject();
- MethodDescCallSite setPrincipalInternal(METHOD__THREAD__SET_PRINCIPAL_INTERNAL, &gc.orThread);
- ARG_SLOT argsToSetPrincipal[2];
- argsToSetPrincipal[0] = ObjToArgSlot(gc.orThread);
- argsToSetPrincipal[1] = ObjToArgSlot(gc.orPrincipal);
- setPrincipalInternal.Call(argsToSetPrincipal);
- }
-#endif
-
gc.orDelegate = ObjectFromHandle(args->share->m_Threadable);
gc.orThreadStartArg = ObjectFromHandle(args->share->m_ThreadStartArg);
@@ -434,20 +413,20 @@ ULONG __stdcall ThreadNative::KickOffThread(void* pass)
}
-FCIMPL3(void, ThreadNative::Start, ThreadBaseObject* pThisUNSAFE, Object* pPrincipalUNSAFE, StackCrawlMark* pStackMark)
+FCIMPL2(void, ThreadNative::Start, ThreadBaseObject* pThisUNSAFE, StackCrawlMark* pStackMark)
{
FCALL_CONTRACT;
HELPER_METHOD_FRAME_BEGIN_NOPOLL();
- StartInner(pThisUNSAFE, pPrincipalUNSAFE, pStackMark);
+ StartInner(pThisUNSAFE, pStackMark);
HELPER_METHOD_FRAME_END_POLL();
}
FCIMPLEND
// Start up a thread, which by now should be in the ThreadStore's Unstarted list.
-void ThreadNative::StartInner(ThreadBaseObject* pThisUNSAFE, Object* pPrincipalUNSAFE, StackCrawlMark* pStackMark)
+void ThreadNative::StartInner(ThreadBaseObject* pThisUNSAFE, StackCrawlMark* pStackMark)
{
CONTRACTL
{
@@ -459,11 +438,9 @@ void ThreadNative::StartInner(ThreadBaseObject* pThisUNSAFE, Object* pPrincipalU
struct _gc
{
- OBJECTREF pPrincipal;
THREADBASEREF pThis;
} gc;
- gc.pPrincipal = (OBJECTREF) pPrincipalUNSAFE;
gc.pThis = (THREADBASEREF) pThisUNSAFE;
GCPROTECT_BEGIN(gc);
@@ -498,7 +475,7 @@ void ThreadNative::StartInner(ThreadBaseObject* pThisUNSAFE, Object* pPrincipalU
// Allocate this away from our stack, so we can unwind without affecting
// KickOffThread. It is inside a GCFrame, so we can enable GC now.
- NewHolder<SharedState> share(new SharedState(threadable, threadStartArg, pNewThread, gc.pPrincipal));
+ NewHolder<SharedState> share(new SharedState(threadable, threadStartArg, pNewThread));
pNewThread->IncExternalCount();
diff --git a/src/vm/comsynchronizable.h b/src/vm/comsynchronizable.h
index 65ec21228b..d9c2defd70 100644
--- a/src/vm/comsynchronizable.h
+++ b/src/vm/comsynchronizable.h
@@ -64,11 +64,11 @@ public:
static LPVOID F_CALL_CONV FastGetCurrentThread();
static LPVOID F_CALL_CONV FastGetDomain();
- static void StartInner(ThreadBaseObject* pThisUNSAFE, Object* pPrincipalUNSAFE, StackCrawlMark* pStackMark);
+ static void StartInner(ThreadBaseObject* pThisUNSAFE, StackCrawlMark* pStackMark);
static FCDECL1(void, Abort, ThreadBaseObject* pThis);
static FCDECL1(void, ResetAbort, ThreadBaseObject* pThis);
- static FCDECL3(void, Start, ThreadBaseObject* pThisUNSAFE, Object* pPrincipalUNSAFE, StackCrawlMark* pStackMark);
+ static FCDECL2(void, Start, ThreadBaseObject* pThisUNSAFE, StackCrawlMark* pStackMark);
#ifndef FEATURE_CORECLR
static FCDECL1(void, Suspend, ThreadBaseObject* pThisUNSAFE);
static FCDECL1(void, Resume, ThreadBaseObject* pThisUNSAFE);
diff --git a/src/vm/security.h b/src/vm/security.h
index da02515ed9..3f3cb38c09 100644
--- a/src/vm/security.h
+++ b/src/vm/security.h
@@ -334,8 +334,6 @@ public:
#ifdef FEATURE_CAS_POLICY
virtual HRESULT LoadSignature( COR_TRUST **ppSignature = NULL) = 0;
- virtual void SetRequestedPermissionSet(OBJECTREF RequiredPermissionSet, OBJECTREF OptionalPermissionSet, OBJECTREF DeniedPermissionSet) = 0;
-
virtual void SetAdditionalEvidence(OBJECTREF evidence) = 0;
virtual BOOL HasAdditionalEvidence() = 0;
virtual OBJECTREF GetAdditionalEvidence() = 0;
diff --git a/src/vm/securitydescriptorassembly.cpp b/src/vm/securitydescriptorassembly.cpp
index b5a412e047..715d956123 100644
--- a/src/vm/securitydescriptorassembly.cpp
+++ b/src/vm/securitydescriptorassembly.cpp
@@ -34,82 +34,6 @@ AssemblySecurityDescriptor::AssemblySecurityDescriptor(AppDomain *pDomain, Domai
} CONTRACTL_END;
}
-#ifdef FEATURE_CAS_POLICY
-OBJECTREF AssemblySecurityDescriptor::GetRequestedPermissionSet(OBJECTREF *pOptionalPermissionSet,
- OBJECTREF *pDeniedPermissionSet)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- PRECONDITION(m_pAppDomain == GetAppDomain());
- PRECONDITION(CheckPointer(pOptionalPermissionSet));
- PRECONDITION(CheckPointer(pDeniedPermissionSet));
- PRECONDITION(m_pAppDomain->GetSecurityDescriptor()->IsLegacyCasPolicyEnabled());
- INJECT_FAULT(COMPlusThrowOM(););
- }
- CONTRACTL_END;
-
- OBJECTREF req = NULL;
- GCPROTECT_BEGIN(req);
-
- if (!IsAssemblyRequestsComputed())
- {
- ReleaseHolder<IMDInternalImport> pImport (m_pAssem->GetFile()->GetMDImportWithRef());
-
- // Try to load permission requests from assembly first.
- SecurityAttributes::LoadPermissionRequestsFromAssembly(pImport,
- &req,
- pOptionalPermissionSet,
- pDeniedPermissionSet);
-
- SetRequestedPermissionSet(req, *pOptionalPermissionSet, *pDeniedPermissionSet);
- }
- else
- {
- *pOptionalPermissionSet = ObjectFromLazyHandle(m_hOptionalPermissionSet, m_pLoaderAllocator);
- *pDeniedPermissionSet = ObjectFromLazyHandle(m_hDeniedPermissionSet, m_pLoaderAllocator);
- req = ObjectFromLazyHandle(m_hRequiredPermissionSet, m_pLoaderAllocator);
- }
-
- GCPROTECT_END();
- return req;
-}
-
-void AssemblySecurityDescriptor::SetRequestedPermissionSet(OBJECTREF RequiredPermissionSet,
- OBJECTREF OptionalPermissionSet,
- OBJECTREF DeniedPermissionSet)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- }
- CONTRACTL_END;
-
- struct _gc
- {
- OBJECTREF RequiredPermissionSet;
- OBJECTREF OptionalPermissionSet;
- OBJECTREF DeniedPermissionSet;
- } gc;
-
- gc.RequiredPermissionSet = RequiredPermissionSet;
- gc.OptionalPermissionSet = OptionalPermissionSet;
- gc.DeniedPermissionSet = DeniedPermissionSet;
-
- GCPROTECT_BEGIN(gc);
- StoreObjectInLazyHandle(m_hRequiredPermissionSet, gc.RequiredPermissionSet, m_pLoaderAllocator);
- StoreObjectInLazyHandle(m_hOptionalPermissionSet, gc.OptionalPermissionSet, m_pLoaderAllocator);
- StoreObjectInLazyHandle(m_hDeniedPermissionSet, gc.DeniedPermissionSet, m_pLoaderAllocator);
- GCPROTECT_END();
-
- m_fAssemblyRequestsComputed = TRUE;
-}
-#endif // FEATURE_CAS_POLICY
-
//
// This method will return TRUE if this assembly is allowed to skip verification.
//
diff --git a/src/vm/securitydescriptorassembly.h b/src/vm/securitydescriptorassembly.h
index 15bc83eef6..4ba65eb11d 100644
--- a/src/vm/securitydescriptorassembly.h
+++ b/src/vm/securitydescriptorassembly.h
@@ -115,10 +115,6 @@ public:
OBJECTREF GetRequestedPermissionSet(OBJECTREF *pOptionalPermissionSet, OBJECTREF *pDeniedPermissionSet);
- virtual void SetRequestedPermissionSet(OBJECTREF RequiredPermissionSet,
- OBJECTREF OptionalPermissionSet,
- OBJECTREF DeniedPermissionSet);
-
#ifndef DACCESS_COMPILE
virtual void SetAdditionalEvidence(OBJECTREF evidence);
virtual BOOL HasAdditionalEvidence();