This in line class is used to handle weak events to avoid memory leaks.
Inheritance: System.Windows.WeakEventManager
        /// <summary>Detach an WeakEventListener to the <c>OddsFormatManager</c>.</summary>
        /// <param name="listener">The listener to detach.</param>
        public static void RemoveEventListener(IWeakEventListener listener)
        {
            if (listener == null)
            {
                throw new ArgumentNullException("listener");
            }

            // calls RemoveListener from the inline WeakOddsFormatChangedEventManager
            WeakOddsFormatChangedEventManager.RemoveListener(listener);
        }
 /// <summary>Attach an WeakEventListener to the <c>OddsFormatManager</c>.</summary>
 /// <param name="listener">The listener to attach.</param>
 public static void AddEventListener(IWeakEventListener listener)
 {
     // calls AddListener from the inline WeakOddsFormatChangedEventManager
     WeakOddsFormatChangedEventManager.AddListener(listener);
 }
Exemple #3
0
 /// <summary>
 /// Detach an WeakEventListener to the <see cref="OddsFormatManager"/>
 /// </summary>
 /// <param name="listener">The listener to detach</param>
 public void RemoveEventListener(IWeakEventListener listener)
 {
     // calls RemoveListener from the inline WeakOddsFormatChangedEventManager
     WeakOddsFormatChangedEventManager.RemoveListener(listener);
 }