• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IWeakEventListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IWeakEventListener的典型用法代码示例。如果您正苦于以下问题:C# IWeakEventListener类的具体用法?C# IWeakEventListener怎么用?C# IWeakEventListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IWeakEventListener类属于命名空间,在下文中一共展示了IWeakEventListener类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
        }
开发者ID:569550384,项目名称:Rafy,代码行数:7,代码来源:PropertyChangedEventManager.cs


示例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);
 }
开发者ID:dsfranzi,项目名称:MVVMLight,代码行数:14,代码来源:PropertyChangedEventManager.cs


示例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);
 }
开发者ID:MakMokMak,项目名称:MakViewModelBase,代码行数:13,代码来源:WeakEventViewModelBase.cs


示例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);
        }
开发者ID:Newtopian,项目名称:nuget,代码行数:7,代码来源:SendingRequestEventManager.cs


示例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();
        }
开发者ID:robertbaker,项目名称:SevenUpdate,代码行数:10,代码来源:WeakCultureChangedEventManager.cs


示例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);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:9,代码来源:PreviewMouseWheelEventManager.cs


示例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();
        }
开发者ID:robertbaker,项目名称:SevenUpdate,代码行数:10,代码来源:WeakCultureChangedEventManager.cs


示例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);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:9,代码来源:DoubleClickEventManager.cs


示例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);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:9,代码来源:DataContextChangedEventManager.cs


示例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); 
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:16,代码来源:CollectionChangedEventManager.cs


示例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);
        }
开发者ID:tccyp001,项目名称:ticketrevolution,代码行数:12,代码来源:EventWeakEventManager.cs


示例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);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:16,代码来源:PropertyChangedEventManager.cs


示例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);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:9,代码来源:DynamicRendererThreadManager.cs


示例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);
        }
开发者ID:Joxx0r,项目名称:ATF,代码行数:11,代码来源:ValueChangedEventManager.cs


示例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


示例16: RemoveListener

        public static void RemoveListener(IUpdatableSettings source,
            IWeakEventListener handler)
        {
            if ( source == null )
            throw new ArgumentNullException("source");
              if ( handler == null )
            throw new ArgumentNullException("handler");

              CurrentManager.ProtectedRemoveListener(source, handler);
        }
开发者ID:bayulabster,项目名称:viasfora,代码行数:10,代码来源:VsfSettingsEventManager.cs


示例17: AddListener

    public static void AddListener( DataGridVirtualizingCollectionViewBase 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,代码来源:ConnectionErrorChangedEventManager.cs


示例18: RemoveListener

    public static void RemoveListener( DataGridCollectionView source, IWeakEventListener listener )
    {
      if( source == null )
        throw new ArgumentNullException( "source" );

      if( listener == null )
        throw new ArgumentNullException( "listener" );

      CurrentManager.ProtectedRemoveListener( source, listener );
    }
开发者ID:austinedeveloper,项目名称:WpfExtendedToolkit,代码行数:10,代码来源:RootGroupChangedEventManager.cs


示例19: RemoveListener

        /// <summary>
        /// Remove a listener to the given source's event.
        /// </summary>
        public static void RemoveListener(INotifyPropertyChanged source, IWeakEventListener listener, string propertyName)
        {
            /* for app-compat, allow RemoveListener(null, x) - it's a no-op (see Dev10 796788)
            if (source == null)
                throw new ArgumentNullException("source");
            */
            if (listener == null)
                throw new ArgumentNullException("listener");

            CurrentManager.PrivateRemoveListener(source, listener, propertyName);
        }
开发者ID:JianwenSun,项目名称:cc,代码行数:14,代码来源:PropertyChangedEventManager.cs


示例20: RemoveListener

        /// <summary>
        /// Remove a listener to the given source's event. 
        /// </summary>
        public static void RemoveListener(ICollectionView source, IWeakEventListener listener)
        {
            /* for app-compat, allow RemoveListener(null, x) - it's a no-op (see Dev10 796788) 
            if (source == null)
                throw new ArgumentNullException("source"); 
            */ 
            if (listener == null)
                throw new ArgumentNullException("listener"); 

            CurrentManager.ProtectedRemoveListener(source, listener);
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:14,代码来源:CurrentChangingEventManager.cs



注:本文中的IWeakEventListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IWeapon类代码示例发布时间:2022-05-24
下一篇:
C# IWaveSource类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap