Freezable.FreezeCore(Boolean) 方法

定义

使 Freezable 对象变为不可修改或测试是否可将其变为不可修改。Makes the Freezable object unmodifiable or tests whether it can be made unmodifiable.

protected:
 virtual bool FreezeCore(bool isChecking);
protected virtual bool FreezeCore (bool isChecking);
abstract member FreezeCore : bool -> bool
override this.FreezeCore : bool -> bool
Protected Overridable Function FreezeCore (isChecking As Boolean) As Boolean

参数

isChecking
Boolean

若为 true,则返回是否可冻结对象的指示(不实际冻结对象);若为 false,则实际冻结对象。true to return an indication of whether the object can be frozen (without actually freezing it); false to actually freeze the object.

返回

Boolean

isCheckingtrue 时,如果可以将 Freezable 变为不可修改,则此方法返回 true;如果无法将其变为不可修改,则返回 falseIf isChecking is true, this method returns true if the Freezable can be made unmodifiable, or false if it cannot be made unmodifiable. isCheckingfalse 时,如果指定的 Freezable 目前已经不可修改,则此方法返回 true,如果无法将其变为不可修改,则返回 falseIf isChecking is false, this method returns true if the if the specified Freezable is now unmodifiable, or false if it cannot be made unmodifiable.

注解

请勿直接调用此方法, (在实现) 中调用基时除外。Do not call this method directly (except when calling base in an implementation). 此方法由 CanFreeze (isChecking 等于) 的属性 trueFreeze (isChecking 等于) 的方法 false 在内部调用。This method is called internally by the CanFreeze property (with isChecking equal to true) and the Freeze method (with isChecking equal to false).

继承者说明

Freezable 如果类包含未使用依赖项属性存储的数据,则实现程序必须重写此方法。 Freezable implementers must override this method when the class contains data that is not stored using dependency properties.

典型的实现将调用 base,然后 Freeze(Freezable, Boolean) 对类所包含的所有 Freezable 类型属性调用静态方法, true 仅当所有属性都已冻结时才返回 (或如果在为) 指定的情况下,则返回 true isCheckingA typical implementation would call base, then call the static Freeze(Freezable, Boolean) method on all Freezable typed properties that the class contains, returning true only if all properties were frozen (or could have been frozen, in the case of specifying true for isChecking).

适用于

另请参阅