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 }); } }
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; }