public EnvConfig(String dbHome, bool useTempIfFault, BerkeleyDbEnvOpen openFlags, BerkeleyDbEnvClose closeFlags) { _dbHome = dbHome; _useTempIfFault = useTempIfFault; _openFlags = openFlags; _closeFlags = closeFlags; }
public static EnvConfig ReadXmlFile() { var root = XElement.Load("envconfig.xml"); XElement xopen = root.Elements("open").Single(); XElement xdbhome = xopen.Elements("dbhome").Single(); bool useTempIfFault; Boolean.TryParse(xdbhome.Attribute("useTempIfFault").Value, out useTempIfFault); BerkeleyDbEnvOpen openFlags = BerkeleyEnumParser.EnvOpenFlags(xopen.Element("flags").Value.Trim()); XElement xclose = root.Elements("close").Single(); BerkeleyDbEnvClose closeFlags = BerkeleyEnumParser.EnvCloseFlags(xclose.Element("flags").Value.Trim()); return(new EnvConfig(xdbhome.Value.Trim(), useTempIfFault, openFlags, closeFlags)); }
public static String ToStringEx(this BerkeleyDbEnvClose flags) { switch (flags) { case 0: return("0"); case BerkeleyDbEnvClose.DB_FORCESYNC: return("db_forcesync"); case BerkeleyDbEnvClose.DB_FORCESYNCENV: return("db_forcesyncenv"); default: throw new ArgumentOutOfRangeException(flags.ToString()); } }
public BerkeleyDbError Close(IntPtr pdbenv, BerkeleyDbEnvClose flag) { return((BerkeleyDbError)_close(pdbenv, (uint)flag)); }
public BerkeleyDbError Close(IntPtr pdbenv, BerkeleyDbEnvClose flag) { return (BerkeleyDbError)_close(pdbenv, (uint)flag); }