DataChangedEventManager 类

定义

提供 WeakEventManager 实现,以便可以使用“弱事件侦听器”模式附加 DataChanged 事件的侦听器。Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the DataChanged event.

public ref class DataChangedEventManager : System::Windows::WeakEventManager
public class DataChangedEventManager : System.Windows.WeakEventManager
type DataChangedEventManager = class
    inherit WeakEventManager
Public Class DataChangedEventManager
Inherits WeakEventManager
继承
DataChangedEventManager

注解

为了成为此模式中的侦听器,侦听器对象必须实现 IWeakEventListenerIn order to be listeners in this pattern, your listener objects must implement IWeakEventListener. 不需要 IWeakEventListener 在作为事件源的类上实现。You do not need to implement IWeakEventListener on the class that is the source of the events.

属性

Dispatcher

获取与此 Dispatcher 关联的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(继承自 DispatcherObject)
Item[Object]

获取或设置为指定的源存储的数据。Gets or sets the data being stored for the specified source.

(继承自 WeakEventManager)
ReadLock

在基础数据表上建立读取锁定,并返回 IDisposableEstablishes a read-lock on the underlying data table, and returns an IDisposable.

(继承自 WeakEventManager)
WriteLock

在基础数据表上建立写入锁定,并返回 IDisposableEstablishes a write-lock on the underlying data table, and returns an IDisposable.

(继承自 WeakEventManager)

方法

AddHandler(DataSourceProvider, EventHandler<EventArgs>)

添加指定的事件处理程序,当指定的源引发 CurrentChanging 事件时进行调用。Adds the specified event handler, which is called when specified source raises the CurrentChanging event.

AddListener(DataSourceProvider, IWeakEventListener)

将指定侦听器添加到指定源的 DataChanged 事件中。Adds the specified listener to the DataChanged event of the specified source.

CheckAccess()

确定调用线程是否可以访问此 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)
DeliverEvent(Object, EventArgs)

将正在托管的事件传送到每个侦听器。Delivers the event being managed to each listener.

(继承自 WeakEventManager)
DeliverEventToList(Object, EventArgs, WeakEventManager+ListenerList)

将正在托管的事件传送到所提供列表中的每个侦听器。Delivers the event being managed to each listener in the provided list.

(继承自 WeakEventManager)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
NewListenerList()

返回包含 DataChanged 事件侦听器的新对象。Returns a new object to contain listeners to the DataChanged event.

NewListenerList()

返回包含事件侦听器的新对象。Returns a new object to contain listeners to an event.

(继承自 WeakEventManager)
ProtectedAddHandler(Object, Delegate)

添加指定的委托为指定源的事件处理程序。Adds the specified delegate as an event handler of the specified source.

(继承自 WeakEventManager)
ProtectedAddListener(Object, IWeakEventListener)

将提供的侦听器添加到为托管事件所提供的源中。Adds the provided listener to the provided source for the event being managed.

(继承自 WeakEventManager)
ProtectedRemoveHandler(Object, Delegate)

从指定的源中移除以前添加的处理程序。Removes the previously added handler from the specified source.

(继承自 WeakEventManager)
ProtectedRemoveListener(Object, IWeakEventListener)

从提供的源中移除以前添加的侦听器。Removes a previously added listener from the provided source.

(继承自 WeakEventManager)
Purge(Object, Object, Boolean)

从所提供源的数据列表中移除不活动的侦听器项。Removes inactive listener entries from the data list for the provided source. 如果某些项实际上已经从列表中移除,则返回 trueReturns true if some entries were actually removed from the list.

(继承自 WeakEventManager)
Remove(Object)

移除指定源的所有侦听器。Removes all listeners for the specified source.

(继承自 WeakEventManager)
RemoveHandler(DataSourceProvider, EventHandler<EventArgs>)

从指定源中移除指定的事件处理程序。Removes the specified event handler from the specified source.

RemoveListener(DataSourceProvider, IWeakEventListener)

将指定的侦听器从指定源的 DataChanged 事件中移除。Removes the specified listener from the DataChanged event of the specified source.

ScheduleCleanup()

要求在优先级较低的线程上清除基础侦听器列表中未使用的项。Requests that a purge of unused entries in the underlying listener list be performed on a lower priority thread.

(继承自 WeakEventManager)
StartListening(Object)

开始对指定源侦听 DataChanged 事件。Begins listening for the DataChanged event on the specified source.

StopListening(Object)

停止对指定源侦听 DataChanged 事件。Stops listening for the DataChanged event on the specified source.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。Enforces that the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)

适用于

另请参阅