protected internal DirectoryEntityCollection Join(DirectoryEntityCollection collection)
        {
            Directories = collection.Directories;
            foreach (var fileCollection in SubEntities)
            {
                foreach (var directoryCollection in collection.SubEntities)
                {
                    fileCollection.Join(directoryCollection);
                }
            }

            return(this);
        }
        protected internal DirectoryEntityCollection Copy()
        {
            var result = new DirectoryEntityCollection()
            {
                Directories = new string[this.Directories.Length],
                Files       = new string[this.Files.Length],
                SubEntities = new DirectoryEntityCollection[this.SubEntities.Length]
            };

            Directories.CopyTo(result.Directories, 0);
            Files.CopyTo(result.Files, 0);

            for (int i = 0; i < this.SubEntities.Length; i++)
            {
                result.SubEntities[i] = SubEntities[i].Copy();
            }

            return(result);
        }
 public DirectoryEntityCollection()
 {
     Files       = new string[0];
     Directories = new string[0];
     SubEntities = new DirectoryEntityCollection[0];
 }
 public DirectoryEntityCollection(string[] files, string[] directories)
 {
     Files       = files;
     Directories = directories;
     SubEntities = new DirectoryEntityCollection[0];
 }