/// <exception cref="System.IO.IOException"></exception>
		private void Defrag(TernaryBool generateCommitTimestamp)
		{
			DefragmentConfig config = new DefragmentConfig(SourceFile(), BackupFile());
			config.Db4oConfig(NewConfiguration());
			config.ForceBackupDelete(true);
			if (!generateCommitTimestamp.IsUnspecified())
			{
				config.Db4oConfig().GenerateCommitTimestamps(generateCommitTimestamp.DefiniteYes(
					));
			}
			Db4objects.Db4o.Defragment.Defragment.Defrag(config);
		}
Example #2
0
		/// <summary>
		/// Checks if the current configuration scope is globally
		/// enabled or disabled.
		/// </summary>
		/// <remarks>
		/// Checks if the current configuration scope is globally
		/// enabled or disabled.
		/// </remarks>
		/// <param name="defaultValue">- default result</param>
		/// <returns>
		/// false if disabled, true if globally enabled, default
		/// value otherwise
		/// </returns>
		public bool ApplyConfig(TernaryBool defaultValue)
		{
			switch (_value)
			{
				case DisabledId:
				{
					return false;
				}

				case GloballyId:
				{
					return !defaultValue.DefiniteNo();
				}

				default:
				{
					return defaultValue.DefiniteYes();
					break;
				}
			}
		}