public RemoveAllTagsFromMusicByTagsAction(IMusicByTags element) { m_Element = element; m_OldTags = new Dictionary <int, HashSet <int> >(); IDictionary <int, HashSet <int> > oldTags = element.GetTags(); foreach (int category in oldTags.Keys) { HashSet <int> tags = new HashSet <int>(); tags.UnionWith(oldTags[category]); m_OldTags[category] = tags; } }
public static IList <String> GetAllMatchingFiles(this IMusicByTags musicByTags) { try { var db = Ares.Tags.TagsModule.GetTagsDB().ReadInterface; switch (musicByTags.TagCategoryCombination) { case TagCategoryCombination.UseOneTagOfEachCategory: return(db.GetAllFilesWithAnyTagInEachCategory(musicByTags.GetTags())); case TagCategoryCombination.UseAnyTag: return(db.GetAllFilesWithAnyTag(musicByTags.GetAllTags())); case TagCategoryCombination.UseAllTags: default: return(db.GetAllFilesWithAllTags(musicByTags.GetAllTags())); } } catch (Ares.Tags.TagsDbException) { return(new List <String>()); } }