Exemplo n.º 1
0
 public override void Unpersist(SessionBase session)
 {
     if (IsPersistent)
     {
         foreach (var file in m_files.ToArray())
         {
             file.Unpersist(session);
         }
         m_files.Unpersist(session);
         foreach (var folder in m_subFolders.ToArray())
         {
             folder.Unpersist(session);
         }
         m_subFolders.Unpersist(session);
         base.Unpersist(session);
     }
 }
Exemplo n.º 2
0
 public override void Unpersist(SessionBase session)
 {
     if (IsPersistent)
     {
         if (m_folderRelation != null)
         {
             m_folderRelation.Unpersist(session);
         }
         foreach (FileInDb file in m_files.ToArray()) // ToArray because file.Unpersist modifies m_files.
         {
             file.Unpersist(session);
         }
         m_files.Unpersist(session);
         foreach (Folder folder in m_folders.ToArray())
         {
             folder.Unpersist(session);
         }
         m_folders.Unpersist(session);
         base.Unpersist(session);
     }
 }