Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 protected void CheckForRepositoryExpired()
 {
     if (!Directory.Exists(SessionRepositoryFileManager.GetContextRepositoryPath(this.Context)))
     {
         throw new ApplicationException(string.Format("Il repository '{0}' risulta scaduto e non può essere più utilizzato", this.Context.Token));
     }
 }
Exemple #2
0
        /// <summary>
        /// Rimozione di tutti i file associati al documento
        /// </summary>
        public void RemoveAllFiles()
        {
            this.CheckForRepositoryExpired();

            foreach (FileInfo file in new DirectoryInfo(SessionRepositoryFileManager.GetContextRepositoryPath(this.Context)).GetFiles())
            {
                file.Delete();
            }
        }
Exemple #3
0
 /// <summary>
 ///
 /// </summary>
 public void Delete()
 {
     Directory.Delete(SessionRepositoryFileManager.GetContextRepositoryPath(this.Context), true);
 }