summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-12-13 04:19:55 -0800
committerGitHub <noreply@github.com>2016-12-13 04:19:55 -0800
commit1cfbb8d79d65ea972eed8d73458fdf93697d031e (patch)
tree0f0a44b613308b3db18970ecb217924c0df58464
parenta6b60a049a78480e651e8c791fed43ffc3846438 (diff)
downloadcoreclr-1cfbb8d79d65ea972eed8d73458fdf93697d031e.tar.gz
coreclr-1cfbb8d79d65ea972eed8d73458fdf93697d031e.tar.bz2
coreclr-1cfbb8d79d65ea972eed8d73458fdf93697d031e.zip
Delete HostProtection attributes (#8610)
-rw-r--r--src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs5
-rw-r--r--src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs1
-rw-r--r--src/mscorlib/src/System/Collections/ArrayList.cs2
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/ConcurrentQueue.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/OrderablePartitioner.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/Partitioner.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Concurrent/PartitionerStatic.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Hashtable.cs1
-rw-r--r--src/mscorlib/src/System/Collections/SortedList.cs1
-rw-r--r--src/mscorlib/src/System/Collections/Stack.cs1
-rw-r--r--src/mscorlib/src/System/Diagnostics/log.cs1
-rw-r--r--src/mscorlib/src/System/IO/MemoryStream.cs3
-rw-r--r--src/mscorlib/src/System/IO/Stream.cs18
-rw-r--r--src/mscorlib/src/System/IO/StreamReader.cs4
-rw-r--r--src/mscorlib/src/System/IO/StreamWriter.cs8
-rw-r--r--src/mscorlib/src/System/IO/TextReader.cs6
-rw-r--r--src/mscorlib/src/System/IO/TextWriter.cs11
-rw-r--r--src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs3
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs1
-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/EnumBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs1
-rw-r--r--src/mscorlib/src/System/Reflection/Emit/UnmanagedMarshal.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs3
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs4
-rw-r--r--src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs1
-rw-r--r--src/mscorlib/src/System/Runtime/GcSettings.cs2
-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/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/ReaderWriterLock.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SemaphoreSlim.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SpinLock.cs1
-rw-r--r--src/mscorlib/src/System/Threading/SpinWait.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/Parallel.cs1
-rw-r--r--src/mscorlib/src/System/Threading/Tasks/ParallelLoopState.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.cs17
-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/Timer.cs1
63 files changed, 0 insertions, 136 deletions
diff --git a/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs b/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
index 1ff2ff11e4..3aafe01a2c 100644
--- a/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
+++ b/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
@@ -47,7 +47,6 @@ namespace Internal.Runtime.Augments
public bool IsBackground
{
get { return IsBackgroundNative(); }
- [HostProtection(SelfAffectingThreading = true)]
set { SetBackgroundNative(value); }
}
@@ -77,7 +76,6 @@ namespace Internal.Runtime.Augments
public ThreadPriority Priority
{
get { return (ThreadPriority)GetPriorityNative(); }
- [HostProtection(SelfAffectingThreading = true)]
set { SetPriorityNative((int)value); }
}
@@ -113,7 +111,6 @@ namespace Internal.Runtime.Augments
** An unstarted thread can be marked to indicate that it will host a
** single-threaded or multi-threaded apartment.
=========================================================================*/
- [HostProtection(Synchronization = true, SelfAffectingThreading = true)]
public bool TrySetApartmentState(ApartmentState state)
{
#if FEATURE_COMINTEROP_APARTMENT_SUPPORT
@@ -184,10 +181,8 @@ namespace Internal.Runtime.Augments
** ThreadInterruptedException if the thread is interrupted while waiting.
** ThreadStateException if the thread has not been started yet.
=========================================================================*/
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public void Join() => JoinInternal(Timeout.Infinite);
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public bool Join(int millisecondsTimeout) => JoinInternal(millisecondsTimeout);
[MethodImpl(MethodImplOptions.InternalCall)]
diff --git a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
index 058247e42a..23631987a5 100644
--- a/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
+++ b/src/mscorlib/src/Microsoft/Win32/SafeHandles/SafeLibraryHandle.cs
@@ -6,7 +6,6 @@ namespace Microsoft.Win32 {
using Microsoft.Win32.SafeHandles;
using System.Security.Permissions;
- [HostProtectionAttribute(MayLeakOnAbort = true)]
sealed internal class SafeLibraryHandle : SafeHandleZeroOrMinusOneIsInvalid {
internal SafeLibraryHandle() : base(true) {}
diff --git a/src/mscorlib/src/System/Collections/ArrayList.cs b/src/mscorlib/src/System/Collections/ArrayList.cs
index e784c08766..e7f121370b 100644
--- a/src/mscorlib/src/System/Collections/ArrayList.cs
+++ b/src/mscorlib/src/System/Collections/ArrayList.cs
@@ -725,7 +725,6 @@ namespace System.Collections {
// Returns a thread-safe wrapper around an IList.
//
- [HostProtection(Synchronization=true)]
public static IList Synchronized(IList list) {
if (list==null)
throw new ArgumentNullException(nameof(list));
@@ -736,7 +735,6 @@ namespace System.Collections {
// Returns a thread-safe wrapper around a ArrayList.
//
- [HostProtection(Synchronization=true)]
public static ArrayList Synchronized(ArrayList list) {
if (list==null)
throw new ArgumentNullException(nameof(list));
diff --git a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
index 6f465896a8..c1a6f7564c 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentDictionary.cs
@@ -40,7 +40,6 @@ namespace System.Collections.Concurrent
[ComVisible(false)]
[DebuggerTypeProxy(typeof(Mscorlib_DictionaryDebugView<,>))]
[DebuggerDisplay("Count = {Count}")]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class ConcurrentDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDictionary, IReadOnlyDictionary<TKey, TValue>
{
/// <summary>
diff --git a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentQueue.cs b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentQueue.cs
index 4069a6b7b1..7aa5971690 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentQueue.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentQueue.cs
@@ -38,7 +38,6 @@ namespace System.Collections.Concurrent
[ComVisible(false)]
[DebuggerDisplay("Count = {Count}")]
[DebuggerTypeProxy(typeof(SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView<>))]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[Serializable]
public class ConcurrentQueue<T> : IProducerConsumerCollection<T>, IReadOnlyCollection<T>
{
diff --git a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
index c97e0f6823..c36d96c26c 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/ConcurrentStack.cs
@@ -45,7 +45,6 @@ namespace System.Collections.Concurrent
/// </remarks>
[DebuggerDisplay("Count = {Count}")]
[DebuggerTypeProxy(typeof(SystemCollectionsConcurrent_ProducerConsumerCollectionDebugView<>))]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class ConcurrentStack<T> : IProducerConsumerCollection<T>, IReadOnlyCollection<T>
{
/// <summary>
diff --git a/src/mscorlib/src/System/Collections/Concurrent/OrderablePartitioner.cs b/src/mscorlib/src/System/Collections/Concurrent/OrderablePartitioner.cs
index 02263b7f97..33e3c88e9a 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/OrderablePartitioner.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/OrderablePartitioner.cs
@@ -61,7 +61,6 @@ namespace System.Collections.Concurrent
/// </ol>
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public abstract class OrderablePartitioner<TSource> : Partitioner<TSource>
{
/// <summary>
diff --git a/src/mscorlib/src/System/Collections/Concurrent/Partitioner.cs b/src/mscorlib/src/System/Collections/Concurrent/Partitioner.cs
index 3d54c1471b..0192b1942c 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/Partitioner.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/Partitioner.cs
@@ -44,7 +44,6 @@ namespace System.Collections.Concurrent
/// </ol>
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public abstract class Partitioner<TSource>
{
/// <summary>
diff --git a/src/mscorlib/src/System/Collections/Concurrent/PartitionerStatic.cs b/src/mscorlib/src/System/Collections/Concurrent/PartitionerStatic.cs
index a946abf5a6..9b36c053ad 100644
--- a/src/mscorlib/src/System/Collections/Concurrent/PartitionerStatic.cs
+++ b/src/mscorlib/src/System/Collections/Concurrent/PartitionerStatic.cs
@@ -69,7 +69,6 @@ namespace System.Collections.Concurrent
/// thread.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public static class Partitioner
{
/// <summary>
diff --git a/src/mscorlib/src/System/Collections/Hashtable.cs b/src/mscorlib/src/System/Collections/Hashtable.cs
index 0b3a6b015f..d4c7d8d673 100644
--- a/src/mscorlib/src/System/Collections/Hashtable.cs
+++ b/src/mscorlib/src/System/Collections/Hashtable.cs
@@ -1046,7 +1046,6 @@ namespace System.Collections {
// Returns a thread-safe wrapper for a Hashtable.
//
- [HostProtection(Synchronization=true)]
public static Hashtable Synchronized(Hashtable table) {
if (table==null)
throw new ArgumentNullException(nameof(table));
diff --git a/src/mscorlib/src/System/Collections/SortedList.cs b/src/mscorlib/src/System/Collections/SortedList.cs
index 0f6ab62d6b..4a480a2c37 100644
--- a/src/mscorlib/src/System/Collections/SortedList.cs
+++ b/src/mscorlib/src/System/Collections/SortedList.cs
@@ -528,7 +528,6 @@ namespace System.Collections {
// Returns a thread-safe SortedList.
//
- [HostProtection(Synchronization=true)]
public static SortedList Synchronized(SortedList list) {
if (list==null)
throw new ArgumentNullException(nameof(list));
diff --git a/src/mscorlib/src/System/Collections/Stack.cs b/src/mscorlib/src/System/Collections/Stack.cs
index d36c8e93cb..c3ad15abd8 100644
--- a/src/mscorlib/src/System/Collections/Stack.cs
+++ b/src/mscorlib/src/System/Collections/Stack.cs
@@ -189,7 +189,6 @@ namespace System.Collections {
// Returns a synchronized Stack.
//
- [HostProtection(Synchronization=true)]
public static Stack Synchronized(Stack stack) {
if (stack==null)
throw new ArgumentNullException(nameof(stack));
diff --git a/src/mscorlib/src/System/Diagnostics/log.cs b/src/mscorlib/src/System/Diagnostics/log.cs
index 6c438c92e9..6916ce3a0a 100644
--- a/src/mscorlib/src/System/Diagnostics/log.cs
+++ b/src/mscorlib/src/System/Diagnostics/log.cs
@@ -22,7 +22,6 @@ namespace System.Diagnostics {
// programatically, by registry (specifics....) or environment
// variables.
[Serializable]
- [HostProtection(Synchronization=true, ExternalThreading=true)]
internal delegate void LogMessageEventHandler(LoggingLevels level, LogSwitch category,
String message,
StackTrace location);
diff --git a/src/mscorlib/src/System/IO/MemoryStream.cs b/src/mscorlib/src/System/IO/MemoryStream.cs
index 5dde00d18e..bdddc83818 100644
--- a/src/mscorlib/src/System/IO/MemoryStream.cs
+++ b/src/mscorlib/src/System/IO/MemoryStream.cs
@@ -181,7 +181,6 @@ namespace System.IO {
public override void Flush() {
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task FlushAsync(CancellationToken cancellationToken) {
@@ -358,7 +357,6 @@ namespace System.IO {
return n;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
@@ -591,7 +589,6 @@ namespace System.IO {
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
diff --git a/src/mscorlib/src/System/IO/Stream.cs b/src/mscorlib/src/System/IO/Stream.cs
index f1a3198fd9..3cdfad613e 100644
--- a/src/mscorlib/src/System/IO/Stream.cs
+++ b/src/mscorlib/src/System/IO/Stream.cs
@@ -109,7 +109,6 @@ namespace System.IO {
}
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task CopyToAsync(Stream destination)
{
@@ -147,14 +146,12 @@ namespace System.IO {
return CopyToAsync(destination, bufferSize);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task CopyToAsync(Stream destination, Int32 bufferSize)
{
return CopyToAsync(destination, bufferSize, CancellationToken.None);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
{
@@ -281,14 +278,12 @@ namespace System.IO {
public abstract void Flush();
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public Task FlushAsync()
{
return FlushAsync(CancellationToken.None);
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public virtual Task FlushAsync(CancellationToken cancellationToken)
{
@@ -303,14 +298,12 @@ namespace System.IO {
return new ManualResetEvent(false);
}
- [HostProtection(ExternalThreading=true)]
public virtual IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return BeginReadInternal(buffer, offset, count, callback, state, serializeAsynchronously: false, apm: true);
}
- [HostProtection(ExternalThreading = true)]
internal IAsyncResult BeginReadInternal(
byte[] buffer, int offset, int count, AsyncCallback callback, Object state,
bool serializeAsynchronously, bool apm)
@@ -405,14 +398,12 @@ namespace System.IO {
}
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task<int> ReadAsync(Byte[] buffer, int offset, int count)
{
return ReadAsync(buffer, offset, count, CancellationToken.None);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task<int> ReadAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
@@ -451,14 +442,12 @@ namespace System.IO {
- [HostProtection(ExternalThreading=true)]
public virtual IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
Contract.Ensures(Contract.Result<IAsyncResult>() != null);
return BeginWriteInternal(buffer, offset, count, callback, state, serializeAsynchronously: false, apm: true);
}
- [HostProtection(ExternalThreading = true)]
internal IAsyncResult BeginWriteInternal(
byte[] buffer, int offset, int count, AsyncCallback callback, Object state,
bool serializeAsynchronously, bool apm)
@@ -701,7 +690,6 @@ namespace System.IO {
bool ITaskCompletionAction.InvokeMayRunArbitraryCode { get { return true; } }
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task WriteAsync(Byte[] buffer, int offset, int count)
{
@@ -710,7 +698,6 @@ namespace System.IO {
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteAsync(Byte[] buffer, int offset, int count, CancellationToken cancellationToken)
{
@@ -782,7 +769,6 @@ namespace System.IO {
Write(oneByteArray, 0, 1);
}
- [HostProtection(Synchronization=true)]
public static Stream Synchronized(Stream stream)
{
if (stream==null)
@@ -928,7 +914,6 @@ namespace System.IO {
Task.CompletedTask;
}
- [HostProtection(ExternalThreading = true)]
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
if (!CanRead) __Error.ReadNotSupported();
@@ -945,7 +930,6 @@ namespace System.IO {
return BlockingEndRead(asyncResult);
}
- [HostProtection(ExternalThreading = true)]
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
if (!CanWrite) __Error.WriteNotSupported();
@@ -1217,7 +1201,6 @@ namespace System.IO {
return _stream.ReadByte();
}
- [HostProtection(ExternalThreading=true)]
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
bool overridesBeginRead = _stream.HasOverriddenBeginEndRead();
@@ -1271,7 +1254,6 @@ namespace System.IO {
_stream.WriteByte(b);
}
- [HostProtection(ExternalThreading=true)]
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, Object state)
{
bool overridesBeginWrite = _stream.HasOverriddenBeginEndWrite();
diff --git a/src/mscorlib/src/System/IO/StreamReader.cs b/src/mscorlib/src/System/IO/StreamReader.cs
index c8a502660f..33cca92abe 100644
--- a/src/mscorlib/src/System/IO/StreamReader.cs
+++ b/src/mscorlib/src/System/IO/StreamReader.cs
@@ -774,7 +774,6 @@ namespace System.IO
}
#region Task based Async APIs
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task<String> ReadLineAsync()
{
@@ -855,7 +854,6 @@ namespace System.IO
return GetStringAndReleaseSharedStringBuilder(sb);
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task<String> ReadToEndAsync()
{
@@ -892,7 +890,6 @@ namespace System.IO
return GetStringAndReleaseSharedStringBuilder(sb);
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task<int> ReadAsync(char[] buffer, int index, int count)
{
@@ -1080,7 +1077,6 @@ namespace System.IO
return charsRead;
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task<int> ReadBlockAsync(char[] buffer, int index, int count)
{
diff --git a/src/mscorlib/src/System/IO/StreamWriter.cs b/src/mscorlib/src/System/IO/StreamWriter.cs
index 470e8912a4..49415d641e 100644
--- a/src/mscorlib/src/System/IO/StreamWriter.cs
+++ b/src/mscorlib/src/System/IO/StreamWriter.cs
@@ -395,7 +395,6 @@ namespace System.IO
}
#region Task based Async APIs
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteAsync(char value)
{
@@ -457,7 +456,6 @@ namespace System.IO
_this.CharPos_Prop = charPos;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteAsync(String value)
{
@@ -543,7 +541,6 @@ namespace System.IO
_this.CharPos_Prop = charPos;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteAsync(char[] buffer, int index, int count)
{
@@ -631,7 +628,6 @@ namespace System.IO
_this.CharPos_Prop = charPos;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteLineAsync()
{
@@ -654,7 +650,6 @@ namespace System.IO
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteLineAsync(char value)
{
@@ -677,7 +672,6 @@ namespace System.IO
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteLineAsync(String value)
{
@@ -700,7 +694,6 @@ namespace System.IO
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteLineAsync(char[] buffer, int index, int count)
{
@@ -733,7 +726,6 @@ namespace System.IO
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task FlushAsync()
{
diff --git a/src/mscorlib/src/System/IO/TextReader.cs b/src/mscorlib/src/System/IO/TextReader.cs
index d5e5a52e07..ca05fa4f2b 100644
--- a/src/mscorlib/src/System/IO/TextReader.cs
+++ b/src/mscorlib/src/System/IO/TextReader.cs
@@ -172,7 +172,6 @@ namespace System.IO {
}
#region Task based Async APIs
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public virtual Task<String> ReadLineAsync()
{
@@ -183,7 +182,6 @@ namespace System.IO {
this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public async virtual Task<String> ReadToEndAsync()
{
@@ -197,7 +195,6 @@ namespace System.IO {
return sb.ToString();
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public virtual Task<int> ReadAsync(char[] buffer, int index, int count)
{
@@ -228,7 +225,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public virtual Task<int> ReadBlockAsync(char[] buffer, int index, int count)
{
@@ -244,7 +240,6 @@ namespace System.IO {
return ReadBlockAsyncInternal(buffer, index, count);
}
- [HostProtection(ExternalThreading=true)]
private async Task<int> ReadBlockAsyncInternal(char[] buffer, int index, int count)
{
Contract.Requires(buffer != null);
@@ -263,7 +258,6 @@ namespace System.IO {
}
#endregion
- [HostProtection(Synchronization=true)]
public static TextReader Synchronized(TextReader reader)
{
if (reader==null)
diff --git a/src/mscorlib/src/System/IO/TextWriter.cs b/src/mscorlib/src/System/IO/TextWriter.cs
index de1bb0c29f..5b460a5683 100644
--- a/src/mscorlib/src/System/IO/TextWriter.cs
+++ b/src/mscorlib/src/System/IO/TextWriter.cs
@@ -124,7 +124,6 @@ namespace System.IO {
}
- [HostProtection(Synchronization=true)]
public static TextWriter Synchronized(TextWriter writer) {
if (writer==null)
throw new ArgumentNullException(nameof(writer));
@@ -486,7 +485,6 @@ namespace System.IO {
}
#region Task based Async APIs
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteAsync(char value)
{
@@ -499,7 +497,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteAsync(String value)
{
@@ -512,7 +509,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task WriteAsync(char[] buffer)
{
@@ -520,7 +516,6 @@ namespace System.IO {
return WriteAsync(buffer, 0, buffer.Length);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteAsync(char[] buffer, int index, int count)
{
@@ -533,7 +528,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteLineAsync(char value)
{
@@ -546,7 +540,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteLineAsync(String value)
{
@@ -559,7 +552,6 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public Task WriteLineAsync(char[] buffer)
{
@@ -567,7 +559,6 @@ namespace System.IO {
return WriteLineAsync(buffer, 0, buffer.Length);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteLineAsync(char[] buffer, int index, int count)
{
@@ -580,14 +571,12 @@ namespace System.IO {
tuple, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task WriteLineAsync()
{
return WriteAsync(CoreNewLine);
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public virtual Task FlushAsync()
{
diff --git a/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs b/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
index f73b5d041f..d78632639b 100644
--- a/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
+++ b/src/mscorlib/src/System/IO/UnmanagedMemoryStream.cs
@@ -265,7 +265,6 @@ namespace System.IO {
if (!_isOpen) __Error.StreamIsClosed();
}
- [HostProtection(ExternalThreading=true)]
[ComVisible(false)]
public override Task FlushAsync(CancellationToken cancellationToken) {
@@ -422,7 +421,6 @@ namespace System.IO {
return nInt;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
if (buffer==null)
@@ -620,7 +618,6 @@ namespace System.IO {
return;
}
- [HostProtection(ExternalThreading = true)]
[ComVisible(false)]
public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken) {
diff --git a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
index a7d1718583..9331ae193c 100644
--- a/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/AssemblyBuilder.cs
@@ -156,7 +156,6 @@ namespace System.Reflection.Emit
// AssemblyBuilder class.
// deliberately not [serializable]
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_AssemblyBuilder))]
[ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
index a4df0e94e7..ef76adcf80 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ConstructorBuilder.cs
@@ -16,7 +16,6 @@ namespace System.Reflection.Emit
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_ConstructorBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
index 1577f1188f..545657a053 100644
--- a/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/CustomAttributeBuilder.cs
@@ -25,7 +25,6 @@ namespace System.Reflection.Emit {
using System.Diagnostics;
using System.Diagnostics.Contracts;
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_CustomAttributeBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
index 05508865fb..82dc2828ca 100644
--- a/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/EnumBuilder.cs
@@ -23,7 +23,6 @@ namespace System.Reflection.Emit {
using System.Security.Permissions;
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_EnumBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
index 0315280898..449b20824c 100644
--- a/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/EventBuilder.cs
@@ -24,7 +24,6 @@ namespace System.Reflection.Emit {
// A EventBuilder is always associated with a TypeBuilder. The TypeBuilder.DefineEvent
// method will return a new EventBuilder to a client.
//
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_EventBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
index 1702c7c471..595d60ada0 100644
--- a/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/FieldBuilder.cs
@@ -13,7 +13,6 @@ namespace System.Reflection.Emit
using System.Security.Permissions;
using System.Diagnostics.Contracts;
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_FieldBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
index 8defdfa62c..654e166a05 100644
--- a/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/MethodBuilder.cs
@@ -19,7 +19,6 @@ namespace System.Reflection.Emit
using System.Diagnostics;
using System.Diagnostics.Contracts;
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_MethodBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
index 46ea6cde2f..6884f50b0e 100644
--- a/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/ModuleBuilder.cs
@@ -50,7 +50,6 @@ namespace System.Reflection.Emit
}
// deliberately not [serializable]
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_ModuleBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
index 00de84c601..e7442b4e02 100644
--- a/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/PropertyBuilder.cs
@@ -25,7 +25,6 @@ namespace System.Reflection.Emit {
// A PropertyBuilder is always associated with a TypeBuilder. The TypeBuilder.DefineProperty
// method will return a new PropertyBuilder to a client.
//
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_PropertyBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
index f6c101869a..73778d5f27 100644
--- a/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/TypeBuilder.cs
@@ -35,7 +35,6 @@ namespace System.Reflection.Emit {
Size128 = 128,
}
- [HostProtection(MayLeakOnAbort = true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_TypeBuilder))]
[System.Runtime.InteropServices.ComVisible(true)]
diff --git a/src/mscorlib/src/System/Reflection/Emit/UnmanagedMarshal.cs b/src/mscorlib/src/System/Reflection/Emit/UnmanagedMarshal.cs
index 09eac3a272..28e95e2456 100644
--- a/src/mscorlib/src/System/Reflection/Emit/UnmanagedMarshal.cs
+++ b/src/mscorlib/src/System/Reflection/Emit/UnmanagedMarshal.cs
@@ -10,7 +10,6 @@ namespace System.Reflection.Emit
// This class is describing the fieldmarshal.
[Serializable]
- [HostProtection(MayLeakOnAbort = true)]
[System.Runtime.InteropServices.ComVisible(true)]
[Obsolete("An alternate API is available: Emit the MarshalAs custom attribute instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public sealed class UnmanagedMarshal
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
index 2723fcf791..6a16462383 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
@@ -32,7 +32,6 @@ namespace System.Runtime.CompilerServices
/// Provides a builder for asynchronous methods that return void.
/// This type is intended for compiler use only.
/// </summary>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct AsyncVoidMethodBuilder
{
/// <summary>The synchronization context associated with this operation.</summary>
@@ -271,7 +270,6 @@ namespace System.Runtime.CompilerServices
/// Prior to being copied, one of its Task, SetResult, or SetException members must be accessed,
/// or else the copies may end up building distinct Task instances.
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct AsyncTaskMethodBuilder
{
/// <summary>A cached VoidTaskResult task used for builders that complete synchronously.</summary>
@@ -418,7 +416,6 @@ namespace System.Runtime.CompilerServices
/// Prior to being copied, one of its Task, SetResult, or SetException members must be accessed,
/// or else the copies may end up building distinct Task instances.
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct AsyncTaskMethodBuilder<TResult>
{
/// <summary>A cached task for default(TResult).</summary>
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
index 61aa077c6b..98a81ea470 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
@@ -57,7 +57,6 @@ namespace System.Runtime.CompilerServices
{
/// <summary>Provides an awaiter for awaiting a <see cref="System.Threading.Tasks.Task"/>.</summary>
/// <remarks>This type is intended for compiler use only.</remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct TaskAwaiter : ICriticalNotifyCompletion
{
/// <summary>The task being awaited.</summary>
@@ -291,7 +290,6 @@ namespace System.Runtime.CompilerServices
/// <summary>Provides an awaiter for awaiting a <see cref="System.Threading.Tasks.Task{TResult}"/>.</summary>
/// <remarks>This type is intended for compiler use only.</remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct TaskAwaiter<TResult> : ICriticalNotifyCompletion
{
/// <summary>The task being awaited.</summary>
@@ -372,7 +370,6 @@ namespace System.Runtime.CompilerServices
/// <summary>Provides an awaiter for a <see cref="ConfiguredTaskAwaitable"/>.</summary>
/// <remarks>This type is intended for compiler use only.</remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct ConfiguredTaskAwaiter : ICriticalNotifyCompletion
{
/// <summary>The task being awaited.</summary>
@@ -459,7 +456,6 @@ namespace System.Runtime.CompilerServices
/// <summary>Provides an awaiter for a <see cref="ConfiguredTaskAwaitable{TResult}"/>.</summary>
/// <remarks>This type is intended for compiler use only.</remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct ConfiguredTaskAwaiter : ICriticalNotifyCompletion
{
/// <summary>The task being awaited.</summary>
diff --git a/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs b/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
index 5881b6414f..86789bf12d 100644
--- a/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
+++ b/src/mscorlib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
@@ -48,7 +48,6 @@ namespace System.Runtime.CompilerServices
/// <summary>Provides an awaiter that switches into a target environment.</summary>
/// <remarks>This type is intended for compiler use only.</remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct YieldAwaiter : ICriticalNotifyCompletion
{
/// <summary>Gets whether a yield is not required.</summary>
diff --git a/src/mscorlib/src/System/Runtime/GcSettings.cs b/src/mscorlib/src/System/Runtime/GcSettings.cs
index fc70183508..91997f5297 100644
--- a/src/mscorlib/src/System/Runtime/GcSettings.cs
+++ b/src/mscorlib/src/System/Runtime/GcSettings.cs
@@ -47,7 +47,6 @@ namespace System.Runtime {
}
// We don't want to allow this API when hosted.
- [HostProtection(MayLeakOnAbort = true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
set
{
@@ -71,7 +70,6 @@ namespace System.Runtime {
}
// We don't want to allow this API when hosted.
- [HostProtection(MayLeakOnAbort = true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
set
{
diff --git a/src/mscorlib/src/System/Threading/AutoResetEvent.cs b/src/mscorlib/src/System/Threading/AutoResetEvent.cs
index 6fe6c06232..78a6fa1234 100644
--- a/src/mscorlib/src/System/Threading/AutoResetEvent.cs
+++ b/src/mscorlib/src/System/Threading/AutoResetEvent.cs
@@ -17,7 +17,6 @@ namespace System.Threading {
using System.Security.Permissions;
using System.Runtime.InteropServices;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AutoResetEvent : EventWaitHandle
{
diff --git a/src/mscorlib/src/System/Threading/CancellationToken.cs b/src/mscorlib/src/System/Threading/CancellationToken.cs
index fc767988ed..5b78f20900 100644
--- a/src/mscorlib/src/System/Threading/CancellationToken.cs
+++ b/src/mscorlib/src/System/Threading/CancellationToken.cs
@@ -39,7 +39,6 @@ namespace System.Threading
/// </para>
/// </remarks>
[ComVisible(false)]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerDisplay("IsCancellationRequested = {IsCancellationRequested}")]
public struct CancellationToken
{
diff --git a/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs b/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
index 34e0bb0aba..ac27fe30e6 100644
--- a/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
+++ b/src/mscorlib/src/System/Threading/CancellationTokenRegistration.cs
@@ -17,7 +17,6 @@ namespace System.Threading
/// <remarks>
/// To unregister a callback, dispose the corresponding Registration instance.
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct CancellationTokenRegistration : IEquatable<CancellationTokenRegistration>, IDisposable
{
private readonly CancellationCallbackInfo m_callbackInfo;
diff --git a/src/mscorlib/src/System/Threading/CancellationTokenSource.cs b/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
index d1f0039a1a..fe9e0dec76 100644
--- a/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
+++ b/src/mscorlib/src/System/Threading/CancellationTokenSource.cs
@@ -36,7 +36,6 @@ namespace System.Threading
/// </para>
/// </remarks>
[ComVisible(false)]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class CancellationTokenSource : IDisposable
{
diff --git a/src/mscorlib/src/System/Threading/CountdownEvent.cs b/src/mscorlib/src/System/Threading/CountdownEvent.cs
index f984fb351c..d86a2ccfb8 100644
--- a/src/mscorlib/src/System/Threading/CountdownEvent.cs
+++ b/src/mscorlib/src/System/Threading/CountdownEvent.cs
@@ -32,7 +32,6 @@ namespace System.Threading
/// </remarks>
[ComVisible(false)]
[DebuggerDisplay("Initial Count={InitialCount}, Current Count={CurrentCount}")]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class CountdownEvent : IDisposable
{
// CountdownEvent is a simple synchronization primitive used for fork/join parallelism. We create a
diff --git a/src/mscorlib/src/System/Threading/EventWaitHandle.cs b/src/mscorlib/src/System/Threading/EventWaitHandle.cs
index faaafff47a..4b1611c6aa 100644
--- a/src/mscorlib/src/System/Threading/EventWaitHandle.cs
+++ b/src/mscorlib/src/System/Threading/EventWaitHandle.cs
@@ -37,7 +37,6 @@ namespace System.Threading
using System.Security.AccessControl;
using System.Diagnostics.Contracts;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[ComVisibleAttribute(true)]
public class EventWaitHandle : WaitHandle
{
diff --git a/src/mscorlib/src/System/Threading/LazyInitializer.cs b/src/mscorlib/src/System/Threading/LazyInitializer.cs
index 36f2cec82e..238cc89dbd 100644
--- a/src/mscorlib/src/System/Threading/LazyInitializer.cs
+++ b/src/mscorlib/src/System/Threading/LazyInitializer.cs
@@ -55,7 +55,6 @@ namespace System.Threading
/// These routines avoid needing to allocate a dedicated, lazy-initialization instance, instead using
/// references to ensure targets have been initialized as they are accessed.
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public static class LazyInitializer
{
/// <summary>
diff --git a/src/mscorlib/src/System/Threading/ManualResetEvent.cs b/src/mscorlib/src/System/Threading/ManualResetEvent.cs
index 504cfb423c..00041567df 100644
--- a/src/mscorlib/src/System/Threading/ManualResetEvent.cs
+++ b/src/mscorlib/src/System/Threading/ManualResetEvent.cs
@@ -17,7 +17,6 @@ namespace System.Threading {
using System.Security.Permissions;
using System.Runtime.InteropServices;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ManualResetEvent : EventWaitHandle
{
diff --git a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
index dc83fac391..509af5bfa0 100644
--- a/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
+++ b/src/mscorlib/src/System/Threading/ManualResetEventSlim.cs
@@ -47,7 +47,6 @@ namespace System.Threading
/// </remarks>
[ComVisible(false)]
[DebuggerDisplay("Set = {IsSet}")]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class ManualResetEventSlim : IDisposable
{
// These are the default spin counts we use on single-proc and MP machines.
diff --git a/src/mscorlib/src/System/Threading/Monitor.cs b/src/mscorlib/src/System/Threading/Monitor.cs
index bb0c59210f..94dec13d05 100644
--- a/src/mscorlib/src/System/Threading/Monitor.cs
+++ b/src/mscorlib/src/System/Threading/Monitor.cs
@@ -27,7 +27,6 @@ namespace System.Threading {
using System.Diagnostics;
using System.Diagnostics.Contracts;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[System.Runtime.InteropServices.ComVisible(true)]
public static class Monitor
{
diff --git a/src/mscorlib/src/System/Threading/Mutex.cs b/src/mscorlib/src/System/Threading/Mutex.cs
index dba5df016b..506abb7a07 100644
--- a/src/mscorlib/src/System/Threading/Mutex.cs
+++ b/src/mscorlib/src/System/Threading/Mutex.cs
@@ -27,7 +27,6 @@ namespace System.Threading
using System.Diagnostics;
using System.Diagnostics.Contracts;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[ComVisible(true)]
public sealed class Mutex : WaitHandle
{
diff --git a/src/mscorlib/src/System/Threading/ReaderWriterLock.cs b/src/mscorlib/src/System/Threading/ReaderWriterLock.cs
index 65127fb202..e35ac7685b 100644
--- a/src/mscorlib/src/System/Threading/ReaderWriterLock.cs
+++ b/src/mscorlib/src/System/Threading/ReaderWriterLock.cs
@@ -25,7 +25,6 @@ namespace System.Threading {
using System.Runtime.Versioning;
using System.Diagnostics.Contracts;
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[ComVisible(true)]
public sealed class ReaderWriterLock: CriticalFinalizerObject
{
diff --git a/src/mscorlib/src/System/Threading/SemaphoreSlim.cs b/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
index a04e43d499..92d760d77d 100644
--- a/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
+++ b/src/mscorlib/src/System/Threading/SemaphoreSlim.cs
@@ -40,7 +40,6 @@ namespace System.Threading
/// </para>
/// </remarks>
[ComVisible(false)]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerDisplay("Current Count = {m_currentCount}")]
public class SemaphoreSlim : IDisposable
{
diff --git a/src/mscorlib/src/System/Threading/SpinLock.cs b/src/mscorlib/src/System/Threading/SpinLock.cs
index 998ea38fd3..1d90890d6e 100644
--- a/src/mscorlib/src/System/Threading/SpinLock.cs
+++ b/src/mscorlib/src/System/Threading/SpinLock.cs
@@ -55,7 +55,6 @@ namespace System.Threading
/// </para>
/// </remarks>
[ComVisible(false)]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerTypeProxy(typeof(SystemThreading_SpinLockDebugView))]
[DebuggerDisplay("IsHeld = {IsHeld}")]
public struct SpinLock
diff --git a/src/mscorlib/src/System/Threading/SpinWait.cs b/src/mscorlib/src/System/Threading/SpinWait.cs
index da913ea9e6..1b31407e0f 100644
--- a/src/mscorlib/src/System/Threading/SpinWait.cs
+++ b/src/mscorlib/src/System/Threading/SpinWait.cs
@@ -70,7 +70,6 @@ namespace System.Threading
/// threads must spin, each should use its own instance of SpinWait.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public struct SpinWait
{
diff --git a/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs b/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
index 48e0f4e7cf..c7a96b0394 100644
--- a/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/ConcurrentExclusiveSchedulerPair.cs
@@ -28,7 +28,6 @@ namespace System.Threading.Tasks
/// Provides concurrent and exclusive task schedulers that coordinate to execute
/// tasks while ensuring that concurrent tasks may run concurrently and exclusive tasks never do.
/// </summary>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerDisplay("Concurrent={ConcurrentTaskCountForDebugger}, Exclusive={ExclusiveTaskCountForDebugger}, Mode={ModeForDebugger}")]
[DebuggerTypeProxy(typeof(ConcurrentExclusiveSchedulerPair.DebugView))]
public class ConcurrentExclusiveSchedulerPair
diff --git a/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs b/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
index 974d427830..c98e219e86 100644
--- a/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/FutureFactory.cs
@@ -39,7 +39,6 @@ namespace System.Threading.Tasks
/// <see cref="System.Threading.Tasks.Task{TResult}.Factory">Task{TResult}.Factory</see> property.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class TaskFactory<TResult>
{
// Member variables, DefaultScheduler, other properties and ctors
diff --git a/src/mscorlib/src/System/Threading/Tasks/Parallel.cs b/src/mscorlib/src/System/Threading/Tasks/Parallel.cs
index ae785593f8..7808943870 100644
--- a/src/mscorlib/src/System/Threading/Tasks/Parallel.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/Parallel.cs
@@ -142,7 +142,6 @@ namespace System.Threading.Tasks
/// The <see cref="T:System.Threading.Tasks.Parallel"/> class provides library-based data parallel replacements
/// for common operations such as for loops, for each loops, and execution of a set of statements.
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public static class Parallel
{
// static counter for generating unique Fork/Join Context IDs to be used in ETW events
diff --git a/src/mscorlib/src/System/Threading/Tasks/ParallelLoopState.cs b/src/mscorlib/src/System/Threading/Tasks/ParallelLoopState.cs
index 4e9755569a..6a62cf8977 100644
--- a/src/mscorlib/src/System/Threading/Tasks/ParallelLoopState.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/ParallelLoopState.cs
@@ -26,7 +26,6 @@ namespace System.Threading.Tasks
/// Enables iterations of <see cref="T:System.Threading.Tasks.Parallel"/> loops to interact with
/// other iterations.
/// </summary>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerDisplay("ShouldExitCurrentIteration = {ShouldExitCurrentIteration}")]
public class ParallelLoopState
{
diff --git a/src/mscorlib/src/System/Threading/Tasks/Task.cs b/src/mscorlib/src/System/Threading/Tasks/Task.cs
index 865ea131c2..cf081f75fd 100644
--- a/src/mscorlib/src/System/Threading/Tasks/Task.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/Task.cs
@@ -137,7 +137,6 @@ namespace System.Threading.Tasks
/// InternalWait method serves a potential marker for when a Task is entering a wait operation.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerTypeProxy(typeof(SystemThreadingTasks_TaskDebugView))]
[DebuggerDisplay("Id = {Id}, Status = {Status}, Method = {DebuggerDisplayMethodDescription}")]
public class Task : IThreadPoolWorkItem, IAsyncResult, IDisposable
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs b/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
index 822ac9b7ac..320f704f09 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskCompletionSource.cs
@@ -48,7 +48,6 @@ namespace System.Threading.Tasks
/// </remarks>
/// <typeparam name="TResult">The type of the result value assocatied with this <see
/// cref="TaskCompletionSource{TResult}"/>.</typeparam>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class TaskCompletionSource<TResult>
{
private readonly Task<TResult> m_task;
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs b/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
index 9e3bd2ec1f..aa4c2df74b 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskFactory.cs
@@ -38,7 +38,6 @@ namespace System.Threading.Tasks
/// <see cref="System.Threading.Tasks.Task.Factory">Task.Factory</see> property.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class TaskFactory
{
// member variables
diff --git a/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs b/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
index 6ff7ceb41d..fad3fc06c5 100644
--- a/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/TaskScheduler.cs
@@ -41,7 +41,6 @@ namespace System.Threading.Tasks
/// </remarks>
[DebuggerDisplay("Id={Id}")]
[DebuggerTypeProxy(typeof(SystemThreadingTasks_TaskSchedulerDebugView))]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public abstract class TaskScheduler
{
////////////////////////////////////////////////////////////
diff --git a/src/mscorlib/src/System/Threading/Tasks/future.cs b/src/mscorlib/src/System/Threading/Tasks/future.cs
index 5a250966ab..0c3fec89b7 100644
--- a/src/mscorlib/src/System/Threading/Tasks/future.cs
+++ b/src/mscorlib/src/System/Threading/Tasks/future.cs
@@ -65,7 +65,6 @@ namespace System.Threading.Tasks
/// and may be used from multiple threads concurrently.
/// </para>
/// </remarks>
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[DebuggerTypeProxy(typeof(SystemThreadingTasks_FutureDebugView<>))]
[DebuggerDisplay("Id = {Id}, Status = {Status}, Method = {DebuggerDisplayMethodDescription}, Result = {DebuggerDisplayResultDescription}")]
public class Task<TResult> : Task
diff --git a/src/mscorlib/src/System/Threading/Thread.cs b/src/mscorlib/src/System/Threading/Thread.cs
index 2022c0533c..8294c20c4d 100644
--- a/src/mscorlib/src/System/Threading/Thread.cs
+++ b/src/mscorlib/src/System/Threading/Thread.cs
@@ -271,7 +271,6 @@ namespace System.Threading {
**
** Exceptions: ThreadStateException if the thread has already been started.
=========================================================================*/
- [HostProtection(Synchronization=true,ExternalThreading=true)]
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public new void Start()
{
@@ -279,7 +278,6 @@ namespace System.Threading {
Start(ref stackMark);
}
- [HostProtection(Synchronization=true,ExternalThreading=true)]
[MethodImplAttribute(MethodImplOptions.NoInlining)] // Methods containing StackCrawlMark local var has to be marked non-inlineable
public new void Start(object parameter)
{
@@ -395,7 +393,6 @@ namespace System.Threading {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern void AbortInternal();
- [HostProtection(Synchronization=true, ExternalThreading=true)]
public bool Join(TimeSpan timeout)
{
long tm = (long)timeout.TotalMilliseconds;
@@ -438,11 +435,9 @@ namespace System.Threading {
a explict busy loop because the hardware can be informed that it is busy waiting. */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- [HostProtection(Synchronization=true,ExternalThreading=true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
private static extern void SpinWaitInternal(int iterations);
- [HostProtection(Synchronization=true,ExternalThreading=true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static new void SpinWait(int iterations)
{
@@ -451,11 +446,9 @@ namespace System.Threading {
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
[SuppressUnmanagedCodeSecurity]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
private static extern bool YieldInternal();
- [HostProtection(Synchronization = true, ExternalThreading = true)]
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static new bool Yield()
{
@@ -529,14 +522,12 @@ namespace System.Threading {
return (ApartmentState)GetApartmentStateNative();
}
- [HostProtection(Synchronization=true, SelfAffectingThreading=true)]
set
{
SetApartmentStateNative((int)value, true);
}
}
- [HostProtection(Synchronization=true, SelfAffectingThreading=true)]
public void SetApartmentState(ApartmentState state)
{
bool result = SetApartmentStateHelper(state, true);
@@ -552,7 +543,6 @@ namespace System.Threading {
** Allocates an un-named data slot. The slot is allocated on ALL the
** threads.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot AllocateDataSlot()
{
return LocalDataStoreManager.AllocateDataSlot();
@@ -563,7 +553,6 @@ namespace System.Threading {
** threads. Named data slots are "public" and can be manipulated by
** anyone.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot AllocateNamedDataSlot(String name)
{
return LocalDataStoreManager.AllocateNamedDataSlot(name);
@@ -574,7 +563,6 @@ namespace System.Threading {
** allocated. Named data slots are "public" and can be manipulated by
** anyone.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static LocalDataStoreSlot GetNamedDataSlot(String name)
{
return LocalDataStoreManager.GetNamedDataSlot(name);
@@ -585,7 +573,6 @@ namespace System.Threading {
** threads. Named data slots are "public" and can be manipulated by
** anyone.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static void FreeNamedDataSlot(String name)
{
LocalDataStoreManager.FreeNamedDataSlot(name);
@@ -594,7 +581,6 @@ namespace System.Threading {
/*=========================================================================
** Retrieves the value from the specified slot on the current thread, for that thread's current domain.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static Object GetData(LocalDataStoreSlot slot)
{
LocalDataStoreHolder dls = s_LocalDataStore;
@@ -611,7 +597,6 @@ namespace System.Threading {
/*=========================================================================
** Sets the data in the specified slot on the currently running thread, for that thread's current domain.
=========================================================================*/
- [HostProtection(SharedState=true, ExternalThreading=true)]
public static void SetData(LocalDataStoreSlot slot, Object data)
{
LocalDataStoreHolder dls = s_LocalDataStore;
@@ -682,7 +667,6 @@ namespace System.Threading {
}
}
- [HostProtection(ExternalThreading=true)]
set {
if (value == null) {
throw new ArgumentNullException(nameof(value));
@@ -900,7 +884,6 @@ namespace System.Threading {
get {
return m_Name;
}
- [HostProtection(ExternalThreading=true)]
set {
lock(this) {
if (m_Name != null)
diff --git a/src/mscorlib/src/System/Threading/ThreadLocal.cs b/src/mscorlib/src/System/Threading/ThreadLocal.cs
index 3495891a50..2b996cb34d 100644
--- a/src/mscorlib/src/System/Threading/ThreadLocal.cs
+++ b/src/mscorlib/src/System/Threading/ThreadLocal.cs
@@ -35,7 +35,6 @@ namespace System.Threading
/// </remarks>
[DebuggerTypeProxy(typeof(SystemThreading_ThreadLocalDebugView<>))]
[DebuggerDisplay("IsValueCreated={IsValueCreated}, Value={ValueForDebugDisplay}, Count={ValuesCountForDebugDisplay}")]
- [HostProtection(Synchronization = true, ExternalThreading = true)]
public class ThreadLocal<T> : IDisposable
{
diff --git a/src/mscorlib/src/System/Threading/ThreadPool.cs b/src/mscorlib/src/System/Threading/ThreadPool.cs
index 3af006be2d..451b15d22f 100644
--- a/src/mscorlib/src/System/Threading/ThreadPool.cs
+++ b/src/mscorlib/src/System/Threading/ThreadPool.cs
@@ -1341,7 +1341,6 @@ namespace System.Threading
NativeOverlapped* pOVERLAP // ptr to OVERLAP structure
);
- [HostProtection(Synchronization=true, ExternalThreading=true)]
public static class ThreadPool
{
diff --git a/src/mscorlib/src/System/Threading/Timer.cs b/src/mscorlib/src/System/Threading/Timer.cs
index 02f7308d12..5bfefccad2 100644
--- a/src/mscorlib/src/System/Threading/Timer.cs
+++ b/src/mscorlib/src/System/Threading/Timer.cs
@@ -756,7 +756,6 @@ namespace System.Threading
}
- [HostProtection(Synchronization=true, ExternalThreading=true)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Timer : MarshalByRefObject, IDisposable
{