Beispiel #1
0
 /// <summary>
 /// Unregisters a handler.
 /// </summary>
 /// <param name="handler">The handler to unregister</param>
 public static void UnregisterOps(IApplyHandler handler)
 {
     _handlers.RemoveAll(x => x.Item2 == handler);
 }
Beispiel #2
0
 /// <summary>
 /// Registers binary operators
 /// </summary>
 /// <param name="handler">The handler to register</param>
 /// <param name="priority">The handler priority</param>
 public static void RegisterHandler(IApplyHandler handler, int priority = 0)
 {
     _handlers.Add(new Tuple <int, IApplyHandler>(priority, handler));
     _handlers.Sort(new TupleComparer <IApplyHandler>());
 }