当前位置: 首页>>代码示例>>C#>>正文


C# IWeakEventListener类代码示例

本文整理汇总了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);
        }
开发者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


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