Freezable.ReadPreamble Freezable.ReadPreamble Freezable.ReadPreamble Freezable.ReadPreamble Method

定義

確定 Freezable 是從有效的執行緒進行存取。Ensures that the Freezable is being accessed from a valid thread. 如果 APIAPI 會讀取非相依性屬性的資料成員,則 Freezable 的繼承者必須在該 API 的開頭呼叫這個方法。Inheritors of Freezable must call this method at the beginning of any APIAPI 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().

適用於

另請參閱