/// <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)); }
/// <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> /// 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; } }
protected static void SetCurrentManager(Type managerType, WeakEventManager manager) { throw new NotImplementedException(); }
public static bool PrepareForWriting (ref WeakEventManager.ListenerList list) { throw new NotImplementedException (); }
protected static void SetCurrentManager (Type managerType, WeakEventManager manager) { throw new NotImplementedException (); }
protected void DeliverEventToList(object sender, EventArgs args, WeakEventManager.ListenerList list) { throw new NotImplementedException (); }