/// <summary> /// Constructor (called by IoC container). /// </summary> /// <param name="userInput">User Input service.</param> /// <param name="consoleWriter">Console writer and formatter service.</param> public ChatClient(IUserInputCommandProcessor userInput, IConsoleChatMessageWriter consoleWriter) { this.UserInput = userInput; this.ConsoleWriter = consoleWriter; this._tokenSource = new CancellationTokenSource(); }
/// <summary> /// Constructor (called by IoC container). /// </summary> /// <param name="consoleWriter">Console writer and formatter service.</param> public ChatServer(IConsoleChatMessageWriter consoleWriter) { this.Users = new Dictionary <Guid, UserData>(); this.Sockets = new Dictionary <Guid, IWebSocketConnection>(); this.ConsoleWriter = consoleWriter; }