Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Toub <stoub@microsoft.com>2019-05-28 13:04:13 +0300
committerMarek Safar <marek.safar@gmail.com>2019-05-28 19:14:19 +0300
commita67c6a2b52980daf2ac43100fc859bcd7b77ef55 (patch)
treef492caac1e6ba46e600099971af9e44f85952d20 /netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
parent5cbe93884798684efbb81abd79e0e2a170544b75 (diff)
Add and apply nullable attributes (dotnet/coreclr#24679)
* Add and apply nullable attributes * Adapt to API review decisions * Address PR feedback Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs')
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
index 7ee3dfac762..cd11839bc87 100644
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
+++ b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
@@ -118,7 +118,7 @@ namespace System.Runtime.Loader
private void RaiseUnloadEvent()
{
// Ensure that we raise the Unload event only once
- Interlocked.Exchange(ref _unloading, null!)?.Invoke(this); // TODO-NULLABLE: https://github.com/dotnet/roslyn/issues/26761
+ Interlocked.Exchange(ref _unloading, null!)?.Invoke(this);
}
private void InitiateUnload()
@@ -442,7 +442,7 @@ namespace System.Runtime.Loader
}
}
- private static AsyncLocal<AssemblyLoadContext>? s_asyncLocalCurrent;
+ private static AsyncLocal<AssemblyLoadContext?>? s_asyncLocalCurrent;
/// <summary>Nullable current AssemblyLoadContext used for context sensitive reflection APIs</summary>
/// <remarks>
@@ -477,9 +477,9 @@ namespace System.Runtime.Loader
{
if (s_asyncLocalCurrent == null)
{
- Interlocked.CompareExchange<AsyncLocal<AssemblyLoadContext>?>(ref s_asyncLocalCurrent, new AsyncLocal<AssemblyLoadContext>(), null);
+ Interlocked.CompareExchange<AsyncLocal<AssemblyLoadContext?>?>(ref s_asyncLocalCurrent, new AsyncLocal<AssemblyLoadContext?>(), null);
}
- s_asyncLocalCurrent!.Value = value!; // TODO-NULLABLE-GENERIC
+ s_asyncLocalCurrent!.Value = value; // Remove ! when compiler specially-recognizes CompareExchange for nullability
}
/// <summary>Enter scope using this AssemblyLoadContext for ContextualReflection</summary>