WeakEventManager.Item[Object] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定指定來源所儲存的資料。
protected:
property System::Object ^ default[System::Object ^] { System::Object ^ get(System::Object ^ source); void set(System::Object ^ source, System::Object ^ value); };
protected object this[object source] { get; set; }
member this.Item(obj) : obj with get, set
Default Protected Property Item(source As Object) As Object
參數
- source
- Object
請求來源的零基索引。
屬性值
管理者為此來源儲存資料。
備註
衍生類別可以選擇要在此索引器中儲存的資料與類型。 通常這會以 WeakEventManager.ListenerList一個 ,即一個弱參考的聆聽者清單來實作。 只有當該 WeakEventManager.ListenerList 類型無法包含你所需資訊時,你才需要更改該類型。 如果是這樣,你必須覆寫該 Purge 方法,確保底層類型的所有清理都能正確執行。