/// <exception cref="System.IO.IOException"></exception> private void Defrag(TernaryBool generateCommitTimestamp) { var config = new DefragmentConfig(SourceFile(), BackupFile()); config.Db4oConfig(NewConfiguration()); config.ForceBackupDelete(true); if (!generateCommitTimestamp.IsUnspecified()) { config.Db4oConfig().GenerateCommitTimestamps(generateCommitTimestamp.DefiniteYes( )); } Db4o.Defragment.Defragment.Defrag(config); }
/// <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; } } }
private ReflectConstructorSpec(TernaryBool canBeInstantiated) { _canBeInstantiated = canBeInstantiated; _constructor = null; }
public ReflectConstructorSpec(IReflectConstructor constructor, object[] args) { _constructor = constructor; _args = args; _canBeInstantiated = TernaryBool.Yes; }
public virtual bool IsStruct() { if (_isStruct == TernaryBool.Unspecified) { _isStruct = Platform4.IsStruct(ClassReflector()) ? TernaryBool.Yes : TernaryBool. No; } return _isStruct == TernaryBool.Yes; }
internal bool CanUpdateFast() { if (_canUpdateFast == TernaryBool.Unspecified) { _canUpdateFast = TernaryBool.ForBoolean(CheckCanUpdateFast()); } return _canUpdateFast.BooleanValue(false); }
private bool Generate1(ConfigScope globalConfig, TernaryBool individualConfig) { return globalConfig.ApplyConfig(individualConfig); }