public void Publish()
        {
            var testMessage = new TestMessageEvent
            {
                Message = "Publish test"
            };

            _eventBus.Publish(testMessage);
        }
示例#2
0
 public void Handle(TestMessageEvent @event)
 {
     try
     {
         Console.WriteLine(@event.Message);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
示例#3
0
    private void OnTestMessageEvent(IEventBase obj)
    {
        TestMessageEvent e = (TestMessageEvent)obj;

        Debug.Log(e.msg);
    }