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