public static void KeepTogether([NotNull] ItemList actionlist, bool fromLibrary, bool showErrors, TVDoc d) { // for each of the items in rcl, do the same copy/move if for other items with the same // base name, but different extensions ItemList extras = new ItemList(); foreach (ActionCopyMoveRename action in actionlist.CopyMoveItems()) { KeepTogetherForItem(actionlist, fromLibrary, action, extras, showErrors, d); } UpdateActionList(actionlist, extras); }
private static bool FindExistingActionFor([NotNull] ItemList addTo, [NotNull] FileSystemInfo fi) { foreach (ActionCopyMoveRename existingFileOperation in addTo.CopyMoveItems()) { if (string.Compare(existingFileOperation.From.FullName, fi.FullName, StringComparison.OrdinalIgnoreCase) == 0) { return(true); } } return(false); }
private static bool ActionListContains(ItemList actionlist, ActionCopyMoveRename newitem) { return(actionlist.CopyMoveItems().Any(cmAction => cmAction.SameSource(newitem))); }