示例#1
0
      public MainWindow()
      {
         InitializeComponent();
         
         EventHub.UiContext = SynchronizationContext.Current;

         EventHub.Events.Subscribe<ConnectionState>(Callback);
         ConnectionState state = new ConnectionState("127.0.0.10", 8080);

         EventHub.Events.Publish<ConnectionState>(state);         

         Console.WriteLine("Finished");

      }
示例#2
0
 public void Callback(ConnectionState state)
 {
    Console.WriteLine(state.Address);
 }