static void Main(string[] args)
        {
            Console.WriteLine("TTSExampleApp starting ...");

            EventAggregator aggregator = new EventAggregator();

            aggregator.SubscribePlugin("TTSExampleApp");
            aggregator.Subscribe(new TTSListener());

            var e = new MyNewOwnEvent {
                Data = "some data"
            };

            aggregator.GlobalPublish(e);

            Console.WriteLine("Press any kay to close.");
            Console.ReadKey();
        }
예제 #2
0
 public void Handle(MyNewOwnEvent receivedEvent)
 {
     Console.WriteLine("My new own event in my new own listener... {0}",
                       receivedEvent.Data);
 }