Пример #1
0
        public Mp3LibrarySorter(IFileSystem fileSystem, string startDirectory, IMp3TagsHierarchy mp3TagsHierarchy, IMp3FileReader mp3FileReader)
        {
            _fileSystem = fileSystem;
            _startDirectory = startDirectory;
            _mp3TagsHierarchy = mp3TagsHierarchy;
            _mp3FileReader = mp3FileReader;

            var files = _fileSystem.GetAllMp3Files(startDirectory);
            _mp3Files = _mp3FileReader.RetrieveTagsFromMp3Files(files);
            foreach (var mp3Representation in _mp3Files)
            {
                _mp3TagsHierarchy.AddInformation(mp3Representation);
            }
        }