private void HandleAllPeople(PacketHeader packetheader, Connection connection, AllPeopleMessage incomingobject) { Console.WriteLine("Message recieved: AllPeopleMessage"); _uiDispatcher.Dispatch(() => { foreach (PersonDto personDto in incomingobject.People) { var messageReceivedEventArgs = new MessageReceivedEventArgs <PersonDto>(personDto); DataReceived?.Invoke(this, messageReceivedEventArgs); } }); }
void IExecutableGlue.Execute(IJavascriptObject[] e) { var parameter = _JavascriptToCSharpConverter.GetFirstArgument <T>(e); if (!parameter.Success) { Logger.Error($"Impossible to call simple command, no matching argument found, received:{parameter.TentativeValue} of type:{parameter.TentativeValue?.GetType()} expectedType: {typeof(T)}"); return; } UiDispatcher.Dispatch(() => _JsSimpleCommand.Execute(parameter.Value)); }
public override void Execute(IJavascriptObject[] e) { var parameter = JavascriptToGlueMapper.GetFirstArgument <T>(e); if (!parameter.Success) { Logger.Error($"Impossible to call Execute on command<{typeof(T)}>, no matching argument found, received:{parameter.TentativeValue} of type:{parameter.TentativeValue?.GetType()} expectedType: {typeof(T)}"); return; } UiDispatcher.Dispatch(() => _Command.Execute(parameter.Value)); }
void IExecutableGlue.Execute(IJavascriptObject[] e) { UiDispatcher.Dispatch(() => _JsSimpleCommand.Execute()); }
public override void Execute(IJavascriptObject[] e) { UiDispatcher.Dispatch(() => _Command.Execute()); }
public override void Execute(IJavascriptObject[] e) { var parameter = _JavascriptToCSharpConverter.GetFirstArgumentOrNull(e); UiDispatcher.Dispatch(() => _Command.Execute(parameter)); }
private void Network_PersonAdded(PacketHeader packetheader, Connection connection, StorePersonMessage incomingobject) { _uiDispatcher.Dispatch(() => PersonAdded?.Invoke(this, new PersonAddedEvent(incomingobject.Person))); }
void IExecutableGlue.Execute(IJavascriptObject[] e) { var parameter = _JavascriptToCSharpConverter.GetFirstArgumentOrNull(e); UiDispatcher.Dispatch(() => _JsSimpleCommand.Execute(parameter)); }