语言

WeakEventManager.Item[Object] 属性

定义

获取或设置为指定源存储的数据。

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 该方法,以便正确执行基础类型的所有清理。

适用于

另请参阅