Exemple #1
0
        /// <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();
        }
Exemple #2
0
 /// <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;
 }