public void OnReceived(int senderId, IMessage message) { IMessagable obj = message.GetMessageObjectOrNull(); if (obj != null) if (obj is IHostCommand) UIDispatcher.Invoke((Action<IHostCommand, int>)((IHost)host).ExecuteCommand, obj, senderId); else if (obj is IUserInformation) UIDispatcher.Invoke((Action<IUserInformation>)((IUser)user).ExecuteInformation, obj); }
public void OnReceived(IMessage message) { IUserInformation info = message.GetMessageObjectOrNull() as IUserInformation; if (info != null) UIDispatcher.Invoke((Action<IUserInformation>)((IUser)user).ExecuteInformation, info); }