Context.Freeze Context.Freeze Context.Freeze Context.Freeze Method

定义

冻结上下文,使其无法从当前上下文添加或移除上下文属性。Freezes the context, making it impossible to add or remove context properties from the current context.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 virtual void Freeze();
[System.Security.SecurityCritical]
public virtual void Freeze ();
abstract member Freeze : unit -> unit
override this.Freeze : unit -> unit
Public Overridable Sub Freeze ()

异常

注解

上下文冻结后, 无法添加上下文属性。Context properties cannot be added after the context has been frozen.

适用于