/// <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)); } }
/// <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(); } }
/// <summary> /// /// </summary> public void Delete() { Directory.Delete(SessionRepositoryFileManager.GetContextRepositoryPath(this.Context), true); }