От: | RobinHood | ||
Дата: | 19.08.13 21:17 | ||
Оценка: |
A>private Dictionary<Type, List<Action<object>>> commands = ...;
A>public void DoCommands(object data)
A>{
A> List<Action<object>> dataCommands;
A> if(commands.TryGet(data.GetType(), out dataCommands))
A> dataCommands.ForEach(cmd => cmd(data));
A>}
A>