AssemblyLoadContext.CurrentContextualReflectionContext Property

Definition

Gets the AssemblyLoadContext set by the most recent call to EnterContextualReflection().

C#
public static System.Runtime.Loader.AssemblyLoadContext? CurrentContextualReflectionContext { get; }

Property Value

The AssemblyLoadContext set by the most recent call to EnterContextualReflection(). This value can be null. The value is stored in an AsyncLocal<T>, so the value is unique per asynchronous context.

Remarks

For more information, see AssemblyLoadContext.CurrentContextualReflectionContext design doc in .NET Core.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9