public static void Remove(List <SubtitleFilesModel> subPath, SubtitleFilesModel subtitleFiles) { if (subPath.Contains(subtitleFiles)) { subPath.Remove(subtitleFiles); } }
public static void Add(IList <SubtitleFilesModel> collection, string filename, SubtitleType SubtitleType) { SubtitleFilesModel file = new SubtitleFilesModel(SubtitleType, filename); if (collection.FirstOrDefault(x => x.FileName == file.FileName) == null) { collection.Add(file); } }