Freezable.ReadPreamble 方法

定义

确保正在从有效的线程访问 FreezableEnsures that the Freezable is being accessed from a valid thread. Freezable 的继承者必须在任何 API 一开始读取不属于依赖项对象的数据成员时调用此方法。Inheritors of Freezable must call this method at the beginning of any API that reads data members that are not dependency properties.

protected:
 void ReadPreamble();
protected void ReadPreamble ();
member this.ReadPreamble : unit -> unit
Protected Sub ReadPreamble ()

继承者说明

派生自 Freezable 的类应在尝试访问任何非依赖属性成员之前调用 ReadPreamble() 方法。Classes that derive from Freezable should call the ReadPreamble() method before they attempt to access any members that are not dependency properties. 在将任何此类成员写入之前,应调用 WritePreamble() 方法。The WritePreamble() method should be called before any such members are written to.

此方法实际上不会调用 VerifyAccess()This method effectively does nothing more than call VerifyAccess().

适用于

另请参阅