Пример #1
0
 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);
         }
     });
 }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }
Пример #4
0
 void IExecutableGlue.Execute(IJavascriptObject[] e)
 {
     UiDispatcher.Dispatch(() => _JsSimpleCommand.Execute());
 }
Пример #5
0
 public override void Execute(IJavascriptObject[] e)
 {
     UiDispatcher.Dispatch(() => _Command.Execute());
 }
Пример #6
0
        public override void Execute(IJavascriptObject[] e)
        {
            var parameter = _JavascriptToCSharpConverter.GetFirstArgumentOrNull(e);

            UiDispatcher.Dispatch(() => _Command.Execute(parameter));
        }
Пример #7
0
 private void Network_PersonAdded(PacketHeader packetheader, Connection connection,
                                  StorePersonMessage incomingobject)
 {
     _uiDispatcher.Dispatch(() => PersonAdded?.Invoke(this, new PersonAddedEvent(incomingobject.Person)));
 }
Пример #8
0
        void IExecutableGlue.Execute(IJavascriptObject[] e)
        {
            var parameter = _JavascriptToCSharpConverter.GetFirstArgumentOrNull(e);

            UiDispatcher.Dispatch(() => _JsSimpleCommand.Execute(parameter));
        }