示例#1
0
        static void Main()
        {
            var bus = new ServiceBus { LocalEndpoint = "minibuss_publisher1" };

            bus.HandleSubscriptionsFor<SomethingHappenedEvent>();

            bus.Start();

            Task.Factory.StartNew(() => PublishingThread(bus), TaskCreationOptions.LongRunning);

            Console.WriteLine("Working, press ENTER to exit");
            Console.ReadLine();
        }
示例#2
0
        static void Main()
        {
            var bus = new ServiceBus {
                LocalEndpoint = "minibuss_publisher1"
            };

            bus.HandleSubscriptionsFor <SomethingHappenedEvent>();

            bus.Start();

            Task.Factory.StartNew(() => PublishingThread(bus), TaskCreationOptions.LongRunning);

            Console.WriteLine("Working, press ENTER to exit");
            Console.ReadLine();
        }