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.

 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().