public static void AddTask(IList <SearchTask> items, string searchLine, KnownConverter converter, string searchDir) { if (!string.IsNullOrEmpty(searchDir) && !items.Any(i => i.SearchLine.Equals(searchLine) && i.Converter.Equals(converter) && i.SearchDir.Equals(searchDir))) { var task = new SearchTask { SearchDir = searchDir, SearchLine = searchLine, Converter = converter }; items.Add(task); } }
public void AddTask(string searchLine, KnownConverter converter, string searchDir) { TaskHelper.AddTask(Items, searchLine, converter, searchDir); OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); }