public IConfigurationNode GetConfiguration(IDirectory directory) { //TODO: cache configuration node objects // get configuration node from the actual mapper var actualConfiguration = m_InnerMapper.GetConfiguration(directory); // wrap node into PrefixConfigurationNode return(new PrefixConfigurationNode(actualConfiguration, this.m_SettingsPrefix)); }
public bool IsConsistent(IAlbum album) { return(m_FileMapper.GetDirectories(album).All(dir => { var configurationNode = m_ConfigurationMapper.GetConfiguration(dir); var coverFileName = configurationNode.GetValue(AlbumDirectoryCoverFileConstants.CoverFileSettingName); return dir.FileExists(coverFileName); })); }
public void Visit(IDirectory directory) { if (AlreadyVisited(directory)) { return; } MarkVisited(directory); ApplyRules(directory, m_ConfigurationMapper.GetConfiguration(directory)); foreach (var file in directory.Files) { file.Accept(this); } foreach (var dir in directory.Directories) { dir.Accept(this); } }
protected string TrackNameToFileName(ITrack track) { var file = m_MetadataMapper.GetFile(track); var configuration = m_ConfigurationMapper.GetConfiguration(file); var name = track.Name; var replacement = configuration.GetValue(FileNameConstants.InvalidCharReplacementSettingName); return(name.ReplaceInvalidFileNameChars(replacement).ReplaceInvalidPathChars(replacement)); }