Beispiel #1
0
 /// <summary>
 /// Set the current manager for the given event.
 /// </summary>
 internal static void SetCurrentManager(Type eventSourceType, string eventName, WeakEventManager manager)
 {
     WeakEventTable table = WeakEventTable.CurrentWeakEventTable;
     table[eventSourceType, eventName] = manager;
 }
 internal EventKey(WeakEventManager manager, object source)
 {
     _manager = manager;
     _source = source;
     _hashcode = unchecked(manager.GetHashCode() + RuntimeHelpers.GetHashCode(source));
 }
Beispiel #3
0
 /// <summary>
 /// Set the current manager for the given manager type.
 /// </summary>
 protected static void SetCurrentManager(Type managerType, WeakEventManager manager)
 {
     WeakEventTable table = WeakEventTable.CurrentWeakEventTable;
     table[managerType] = manager;
 }
        //
        //  Internal Methods
        //

        /// <summary>
        /// Remove the data for the given manager and source.
        /// </summary>
        internal void Remove(WeakEventManager manager, object source)
        {
            EventKey key = new EventKey(manager, source);
            _dataTable.Remove(key);
        }
 internal EventKey(WeakEventManager manager, object source, bool useWeakRef)
 {
     _manager = manager;
     _source = new WeakReference(source);
     _hashcode = unchecked(manager.GetHashCode() + RuntimeHelpers.GetHashCode(source));
 }
        /// <summary>
        /// Set the current manager for the given event.
        /// </summary>
        internal static void SetCurrentManager(Type eventSourceType, string eventName, WeakEventManager manager)
        {
            WeakEventTable table = WeakEventTable.CurrentWeakEventTable;

            table[eventSourceType, eventName] = manager;
        }
        /// <summary>
        /// Get or set the data stored by the given manager for the given source.
        /// </summary>
        internal object this[WeakEventManager manager, object source]
        {
            get
            {
                EventKey key = new EventKey(manager, source);
                object result = _dataTable[key];
                return result;
            }

            set
            {
                EventKey key = new EventKey(manager, source, true);
                _dataTable[key] = value;
            }
        }
        /// <summary>
        /// Set the current manager for the given manager type.
        /// </summary>
        protected static void SetCurrentManager(Type managerType, WeakEventManager manager)
        {
            WeakEventTable table = WeakEventTable.CurrentWeakEventTable;

            table[managerType] = manager;
        }
Beispiel #9
0
 protected static void SetCurrentManager(Type managerType, WeakEventManager manager)
 {
     throw new NotImplementedException();
 }
Beispiel #10
0
			public static bool PrepareForWriting (ref WeakEventManager.ListenerList list)
			{
				throw new NotImplementedException ();
			}
Beispiel #11
0
		protected static void SetCurrentManager (Type managerType, WeakEventManager manager)
		{
			throw new NotImplementedException ();
		}
 protected void DeliverEventToList(object sender, EventArgs args, WeakEventManager.ListenerList list)
 {
     throw new NotImplementedException ();
 }