private static void Main(string[] args) { client = new ClientService(); while (true) { Console.WriteLine("Enter command.."); string readMemoryCommand = Console.ReadLine(); try { string[] values = ParseCommand(readMemoryCommand); ProcessRequest(values); } catch (Exception e) { Console.WriteLine(e.Message); } } }
protected override void ProcessRecord() { var client = new ClientService(Constants.ConnectionString); client.Read(); }
public Window1(IServerService serverChannel, Guid userId, string username, ServerProxy serverProxy, ClientService clientService) { InitializeComponent(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; this._serverChannel = serverChannel; this._userId = userId; this._username = username; this._serverProxy = serverProxy; this._clientService = clientService; _clientService.ConnectedClientsListUpdatedEvent += UpdateListOfConnectedClients; _clientService.NewMessageReceivedEvent += DisplayNewMessage; clientsListBox.SelectionChanged += OnClientSelect; Closed += OnClosed; }