public void Run() { int port = _view.ReadInputPortNumber(); _client = new Client.Client <User>(port); _client.Listen(message => _view.PrintMessage(message.ToString())); Console.ReadKey(); }
public FolderLibrary(string storagePath, Client.IClient client) { _storagePath = storagePath; _libraryPath = Path.Combine(_storagePath, LibraryFileName); _client = client; // If library doesn't exist, initialize. if (!File.Exists(_libraryPath)) { new XDocument(new XElement("songs")).Save(_libraryPath); } InitCache(); }