コード例 #1
0
ファイル: ClientController.cs プロジェクト: gladki24/Vettel
        public void Run()
        {
            int port = _view.ReadInputPortNumber();

            _client = new Client.Client <User>(port);
            _client.Listen(message => _view.PrintMessage(message.ToString()));
            Console.ReadKey();
        }
コード例 #2
0
ファイル: FolderLibrary.cs プロジェクト: hyvart/Unjammit
        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();
        }