Exemplo n.º 1
0
        protected void ForwardSignal(ISignal from, ISignal to)
        {
            Slot callbackUsed = to.DispatchArgs;

            // remember it so we can remove on destruction of the mediator
            RegisteredSignalSlots.Add(new KeyValuePair <ISignal, Slot>(from, callbackUsed));

            from.Add(callbackUsed);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Maps a signal to a method. When the signal is dispatcher the method is called.
 /// </summary>
 /// <param name="signal"></param>
 /// <param name="slot"></param>
 protected void MapSignal(ISignal signal, Slot slot)
 {
     signal.Add(slot);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Maps a signal to a command. When the signal is deispatcher the command is created and executed.
 /// </summary>
 /// <param name="signal"></param>
 /// <param name="commandClass"></param>
 protected void MapSignal(ISignal signal, Type commandClass)
 {
     signal.Add(args => ExecuteCommand(commandClass, args));
 }