AssemblyLoadContext.EnterContextualReflection Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
EnterContextualReflection() |
Sets CurrentContextualReflectionContext to |
EnterContextualReflection(Assembly) |
Sets CurrentContextualReflectionContext to the AssemblyLoadContext which loaded the assembly. |
- Source:
- AssemblyLoadContext.cs
- Source:
- AssemblyLoadContext.cs
- Source:
- AssemblyLoadContext.cs
Sets CurrentContextualReflectionContext to this
AssemblyLoadContext.
public:
System::Runtime::Loader::AssemblyLoadContext::ContextualReflectionScope EnterContextualReflection();
public System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection();
member this.EnterContextualReflection : unit -> System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope
Public Function EnterContextualReflection () As AssemblyLoadContext.ContextualReflectionScope
Returns
An object to restore the previous value of CurrentContextualReflectionContext. It is intended to be used as an IDisposable in a using
block.
Remarks
For more information, see AssemblyLoadContext.CurrentContextualReflectionContext design doc in .NET Core.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
- Source:
- AssemblyLoadContext.cs
- Source:
- AssemblyLoadContext.cs
- Source:
- AssemblyLoadContext.cs
Sets CurrentContextualReflectionContext to the AssemblyLoadContext which loaded the assembly.
public:
static System::Runtime::Loader::AssemblyLoadContext::ContextualReflectionScope EnterContextualReflection(System::Reflection::Assembly ^ activating);
public static System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope EnterContextualReflection(System.Reflection.Assembly? activating);
static member EnterContextualReflection : System.Reflection.Assembly -> System.Runtime.Loader.AssemblyLoadContext.ContextualReflectionScope
Public Shared Function EnterContextualReflection (activating As Assembly) As AssemblyLoadContext.ContextualReflectionScope
Parameters
- activating
- Assembly
The assembly that is used to determine the requested AssemblyLoadContext instance.
Returns
An object to restore the previous value of CurrentContextualReflectionContext. It is intended to be used as an IDisposable in a using
block.
Remarks
For more information, see AssemblyLoadContext.CurrentContextualReflectionContext design doc in .NET Core.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: