Esempio n. 1
0
 private void DeleteTempCurrentDbFile()
 {
     try
     {
         if (File.Exists(FilesProvider.GetTempCurrentDbFileName()))
         {
             GC.Collect();
             File.Delete(FilesProvider.GetTempCurrentDbFileName());
         }
     }
     catch (Exception ex)
     {
         log.Error("Unable to remove temporary db file", ex);
     }
 }
		/// <summary>
		/// Constructor with mainform
		/// </summary>
		/// <param name="mainForm">Mainform </param>
		public MsSqlAuditorModel()
		{
			this._vaultProcessors  = new Dictionary<ConnectionGroupInfo, IStorageManager>();
			this._settings         = null;
			this._layoutSettings   = null;
			this._localeManager    = null;
			this._templateSettings = null;
			this._filesProvider    = new FilesProvider(this);

			LoadSettings();

			this._visualizeProcessor = new VisualizeProcessor(this);
			this._cryptoService      = new CachingCryptoService(Settings.EncryptionKey);

			DeleteTempCurrentDbFile();
		}
Esempio n. 3
0
        /// <summary>
        /// Constructor with mainform
        /// </summary>
        /// <param name="mainForm">Mainform </param>
        public MsSqlAuditorModel()
        {
            this._vaultProcessors  = new Dictionary <ConnectionGroupInfo, IStorageManager>();
            this._settings         = null;
            this._layoutSettings   = null;
            this._localeManager    = null;
            this._templateSettings = null;
            this._filesProvider    = new FilesProvider(this);

            LoadSettings();

            this._visualizeProcessor = new VisualizeProcessor(this);
            this._cryptoService      = new CachingCryptoService(Settings.EncryptionKey);

            DeleteTempCurrentDbFile();
        }
		public StorageManager(
			MsSqlAuditorModel model,
			FilesProvider     filesProvider,
			bool              updateHistory
		) : this(
				model,
				updateHistory,
				filesProvider.GetCurrentDbFileName(),
				filesProvider.GetHistoricDbFileName(),
				filesProvider.GetReportDbFileName()
			)
		{
		}