9 private sealed
class ListEntry
11 internal ListEntry next;
17 public ListEntry(
object key,
Delegate handler, ListEntry next)
21 this.handler = handler;
25 private ListEntry head;
36 ListEntry listEntry =
null;
37 if (parent ==
null || parent.CanRaiseEventsInternal)
39 listEntry = Find(key);
41 return listEntry?.handler;
45 ListEntry listEntry = Find(key);
46 if (listEntry !=
null)
48 listEntry.handler = value;
52 head =
new ListEntry(key, value, head);
72 ListEntry listEntry = Find(key);
73 if (listEntry !=
null)
79 head =
new ListEntry(key, value, head);
87 for (ListEntry next = listToAddFrom.head; next !=
null; next = next.next)
99 private ListEntry Find(
object key)
101 ListEntry next = head;
102 while (next !=
null && next.key != key)
114 ListEntry listEntry = Find(key);
115 if (listEntry !=
null)
EventHandlerList()
Initializes a new instance of the T:System.ComponentModel.EventHandlerList class.
Provides a mechanism for releasing unmanaged resources.To browse the .NET Framework source code for t...
void AddHandler(object key, Delegate value)
Adds a delegate to the list.
Provides a simple list of delegates. This class cannot be inherited.
void Dispose()
Disposes the delegate list.
static Delegate Remove(Delegate source, Delegate value)
Removes the last occurrence of the invocation list of a delegate from the invocation list of another ...
static Delegate Combine(Delegate a, Delegate b)
Concatenates the invocation lists of two delegates.
SecurityAction
Specifies the security actions that can be performed using declarative security.
void RemoveHandler(object key, Delegate value)
Removes a delegate from the list.
Provides the base implementation for the T:System.ComponentModel.IComponent interface and enables obj...
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
void AddHandlers(EventHandlerList listToAddFrom)
Adds a list of delegates to the current list.