public Operation(string sourceDir, string targetDir, Item[] items) { this.items = items.Where(n => n.Kind != Kind.Parent && n.Kind != Kind.Drive).ToArray(); sourceProcessor = OperationProcessor.Create(sourceDir); if (!string.IsNullOrEmpty(targetDir)) { targetProcessor = OperationProcessor.Create(targetDir); } }
public override bool CheckSubordinates(Item[] items, OperationProcessor target) { var targetProcessor = target as DirectoryProcessor; if (targetProcessor == null) { // verschiedene Processoren, kann nicht untergeordnet sein return(true); } var parents = targetProcessor.GetParentItems(); var directories = items.Where(n => n.Kind == Kind.Directory).ToArray(); return(directories.Any(n => CheckSubordinates(Directory, n, parents) == false) ? false : true); }
public virtual bool CheckSubordinates(Item[] items, OperationProcessor target) { return(true); }