AssemblyLoadContext.ContextualReflectionScope 结构

定义

提供专用于 EnterContextualReflection() 的返回类型。Provides a return type used exclusively for EnterContextualReflection(). 它将作为 IDisposableusing 块中使用。It is intended to be used as an IDisposable in a using block.

public: value class AssemblyLoadContext::ContextualReflectionScope : IDisposable
public struct AssemblyLoadContext.ContextualReflectionScope : IDisposable
type AssemblyLoadContext.ContextualReflectionScope = struct
    interface IDisposable
Public Structure AssemblyLoadContext.ContextualReflectionScope
Implements IDisposable
继承
AssemblyLoadContext.ContextualReflectionScope
实现

注解

这是 api 的实现细节 EnterContextualReflectionThis is an implementation detail of the EnterContextualReflection APIs. 它是一个结构,可避免堆分配。It is a struct, to avoid heap allocation. 必须是公共的,才能避免装箱。It is required to be public to avoid boxing.

方法

Dispose()

CurrentContextualReflectionContext 设置为返回此实例的 EnterContextualReflection() 调用前面的值。Sets CurrentContextualReflectionContext to the value preceding the call to EnterContextualReflection() which returned this instance.

适用于