public void InvokeAndRemove(IEventDictionaryHandler <TKey, TValue> handler) { foreach (var kvp in collection) { handler.OnRemove(kvp.Key, kvp.Value); } Remove(handler); }
public void AddAndInvoke(IEventDictionaryHandler <TKey, TValue> handler) { Add(handler); foreach (var kvp in collection) { handler.OnAdd(kvp.Key, kvp.Value); } }
public void Remove(IEventDictionaryHandler <TKey, TValue> handler) { collection.Handlers.internalHandlers.Remove(new KeyValuePair <object, IEventDictionaryHandler <TKey, TValue> >(context, handler)); }