本文整理汇总了C#中IWeakEventListener类的典型用法代码示例。如果您正苦于以下问题:C# IWeakEventListener类的具体用法?C# IWeakEventListener怎么用?C# IWeakEventListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWeakEventListener类属于命名空间,在下文中一共展示了IWeakEventListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveListener
public static void RemoveListener(INotifyPropertyChanged source, IWeakEventListener listener)
{
if (source == null) { throw new ArgumentNullException("source"); }
if (listener == null) { throw new ArgumentNullException("listener"); }
PropertyChangedEventManager.CurrentManager.ProtectedRemoveListener(source, listener);
}
示例2: AddListener
/// <summary>
/// Adds the specified listener to the list of listeners on the specified source.
/// </summary>
/// <param name="source">The object with the event.</param>
/// <param name="listener">The object to add as a listener.</param>
/// <param name="propertyName">The name of the property that exists on
/// source upon which to listen for changes.</param>
public static void AddListener(
INotifyPropertyChanged source,
IWeakEventListener listener,
string propertyName)
{
Instance.PrivateAddListener(source, listener, propertyName);
}
示例3: RemoveListener
/// <summary>
/// PropertyChangedEventManager から弱いイベントのリスナーを削除します。
/// (明示的に削除を行わなくてもメモリーリークは発生しません)
/// </summary>
/// <param name="notifyObject">WeakPropertyChanged を発火するオブジェクト</param>
/// <param name="weakEventListener">弱いイベントの発火を待ち受けるオブジェクト</param>
public void RemoveListener(INotifyPropertyChanged notifyObject, IWeakEventListener weakEventListener)
{
PropertyChangedEventManager.RemoveListener(
notifyObject,
weakEventListener,
string.Empty);
}
示例4: RemoveListener
public static void RemoveListener(IHttpClientEvents source, IWeakEventListener listener)
{
// weak event pattern cannot be used if we're running from command line.
Debug.Assert(!EnvironmentUtility.RunningFromCommandLine);
SendingRequestEventManager.CurrentManager.ProtectedRemoveListener(source, listener);
}
示例5: RemoveListener
/// <summary>Removes an listener from the inner list of listeners.</summary>
/// <param name="listener">The listener to remove.</param>
internal static void RemoveListener(IWeakEventListener listener)
{
// removes the listener from the inner list of listeners
CurrentManager.listeners.Remove(listener);
// start / stop the listening process
CurrentManager.StartStopListening();
}
示例6: RemoveListener
/// <summary>Removes the specified listener from the list of listeners on the provided source.</summary>
public static void RemoveListener(DependencyObject source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
PreviewMouseWheelEventManager.CurrentManager.ProtectedRemoveListener(source, listener);
}
示例7: AddListener
/// <summary>Adds an listener to the inner list of listeners.</summary>
/// <param name="listener">The listener to add.</param>
internal static void AddListener(IWeakEventListener listener)
{
// add the listener to the inner list of listeners
CurrentManager.listeners.Add(listener);
// start / stop the listening process
CurrentManager.StartStopListening();
}
示例8: AddListener
/// <summary>Adds the provided listener to the list of listeners on the provided source.</summary>
public static void AddListener(DependencyObject source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
DoubleClickEventManager.CurrentManager.ProtectedAddListener(source, listener);
}
示例9: RemoveListener
/// <summary>Removes the specified listener from the list of listeners on the provided source.</summary>
public static void RemoveListener(DependencyObject source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
DataContextChangedEventManager.CurrentManager.ProtectedRemoveListener(source, listener);
}
示例10: AddListener
//
// Public Methods
//
/// <summary>
/// Add a listener to the given source's event.
/// </summary>
public static void AddListener(INotifyCollectionChanged source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
CurrentManager.ProtectedAddListener(source, listener);
}
示例11: RemoveHandler
/// <summary>
/// Remove a handler for the given source's event.
/// </summary>
public static void RemoveHandler(EventCallBackHandler source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
CurrentManager.ProtectedRemoveListener(source, listener);
}
示例12: AddListener
//
// Public Methods
//
/// <summary>
/// Add a listener to the given source's event.
/// </summary>
public static void AddListener(INotifyPropertyChanged source, IWeakEventListener listener, string propertyName)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
CurrentManager.PrivateAddListener(source, listener, propertyName);
}
示例13: AddListener
public static void AddListener(Dispatcher source, IWeakEventListener listener)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
CurrentManager.ProtectedAddListener(source, listener);
}
示例14: RemoveListener
/// <summary>
/// Remove a listener to the given source's event.</summary>
public static void RemoveListener(object source, IWeakEventListener listener, PropertyDescriptor pd)
{
if (source == null)
throw new ArgumentNullException("source");
if (listener == null)
throw new ArgumentNullException("listener");
CurrentManager.PrivateRemoveListener(source, listener, pd);
}
示例15: AddListener
public static void AddListener( DataGridItemPropertyCollection source, IWeakEventListener listener )
{
if( source == null )
throw new ArgumentNullException( "source" );
if( listener == null )
throw new ArgumentNullException( "listener" );
CurrentManager.ProtectedAddListener( source, listener );
}
开发者ID:austinedeveloper,项目名称:WpfExtendedToolkit,代码行数:10,代码来源:ItemPropertyGroupSortStatNameChangedEventManager.cs