Beispiel #1
0
 public static void CopyFolderInfo(FolderImpl folderImpl, FolderInDatabase folderToReplace)
 {
     // TODO KBR duplicated in CompressedFile but problems with class structure
     foreach (FolderInDatabase folder in folderImpl.Folders)
     {
         FolderInDatabase subFolderToReplace = folderToReplace.findFolder(folder.Name);
         if (subFolderToReplace != null)
         {
             folder.CopyAdditionalInfo(subFolderToReplace);
         }
     }
     foreach (FileInDatabase file in folderImpl.Files)
     {
         FileInDatabase fileToReplace = folderToReplace.findFile(file.Name);
         if (fileToReplace != null)
         {
             file.Keywords = fileToReplace.Keywords;
             foreach (LogicalFolder logicalFolder in fileToReplace.LogicalFolders)
             {
                 logicalFolder.AddItem(file);
             }
         }
     }
 }
Beispiel #2
0
 public CompressedFile(FolderInDatabase parent)
     : base(parent)
 {
     folderImpl = new FolderImpl(this, 2);
 }
Beispiel #3
0
 public FolderInDatabase(IFolder parent) : base(parent)
 {
     folderImpl = new FolderImpl(this, 1);
 }