예제 #1
0
 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);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
 public virtual bool CheckSubordinates(Item[] items, OperationProcessor target)
 {
     return(true);
 }