예제 #1
0
        static void Main(string[] args)
        {
            Console.WindowWidth = 160;
            Console.ForegroundColor = ConsoleColor.Green;

            RegisterBus();

            messageHubProxy = new MessageHubProxy();
            ObjectFactory.Initialize(c => c.ForSingletonOf<MessageHubProxy>().Use(messageHubProxy));

            System.Threading.Thread.Sleep(3000);

            while(true)
            {
                Console.WriteLine("What would you like to send?");
                var message = Console.ReadLine();
                Bus.Send(new DistributedMessage { Content = message });
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WindowWidth     = 160;
            Console.ForegroundColor = ConsoleColor.Green;

            RegisterBus();

            messageHubProxy = new MessageHubProxy();
            ObjectFactory.Initialize(c => c.ForSingletonOf <MessageHubProxy>().Use(messageHubProxy));

            System.Threading.Thread.Sleep(3000);

            while (true)
            {
                Console.WriteLine("What would you like to send?");
                var message = Console.ReadLine();
                Bus.Send(new DistributedMessage {
                    Content = message
                });
            }
        }
 public NotifyReceivedMessage(MessageHubProxy messageHubProxy)
 {
     this.messageHubProxy = messageHubProxy;
 }