public static void AddReceiver(InputReceiver receiver) { // Add the receiver in priority order int index = receivers.BinarySearch(receiver, new ByPriority()); if (index < 0) { index = ~index; } receivers.Insert(index, receiver); }
public static void RemoveReceiver(InputReceiver receiver) => receivers.Remove(receiver);