public static void Config(XmlElement xmlElement, ref MPoolConfig mpoolConfig, bool compulsory) { uint uintValue = new uint(); int intValue = new int(); Configuration.ConfigCacheInfo(xmlElement, "CacheSize", ref mpoolConfig.CacheSize, compulsory); Configuration.ConfigCacheInfo(xmlElement, "MaxCacheSize", ref mpoolConfig.MaxCacheSize, compulsory); if (Configuration.ConfigInt(xmlElement, "MaxOpenFiles", ref intValue, compulsory)) { mpoolConfig.MaxOpenFiles = intValue; } Configuration.ConfigMaxSequentialWrites( xmlElement, "MaxSequentialWrites", mpoolConfig, compulsory); if (Configuration.ConfigUint(xmlElement, "MMapSize", ref uintValue, compulsory)) { mpoolConfig.MMapSize = uintValue; } }
public static void Config(XmlElement xmlElement, ref DatabaseConfig dbConfig, bool compulsory) { uint pageSize = new uint(); Configuration.ConfigBool(xmlElement, "AutoCommit", ref dbConfig.AutoCommit, compulsory); Configuration.ConfigByteOrder(xmlElement, "ByteOrder", ref dbConfig.ByteOrder, compulsory); Configuration.ConfigCacheInfo(xmlElement, "CacheSize", ref dbConfig.CacheSize, compulsory); Configuration.ConfigBool(xmlElement, "DoChecksum", ref dbConfig.DoChecksum, compulsory); Configuration.ConfigString(xmlElement, "ErrorPrefix", ref dbConfig.ErrorPrefix, compulsory); Configuration.ConfigBool(xmlElement, "FreeThreaded", ref dbConfig.FreeThreaded, compulsory); Configuration.ConfigBool(xmlElement, "NoMMap", ref dbConfig.NoMMap, compulsory); Configuration.ConfigBool(xmlElement, "NonDurableTxns", ref dbConfig.NonDurableTxns, compulsory); if (Configuration.ConfigUint(xmlElement, "PageSize", ref pageSize, compulsory)) { dbConfig.PageSize = pageSize; } Configuration.ConfigCachePriority(xmlElement, "Priority", ref dbConfig.Priority, compulsory); Configuration.ConfigBool(xmlElement, "ReadOnly", ref dbConfig.ReadOnly, compulsory); Configuration.ConfigBool(xmlElement, "ReadUncommitted", ref dbConfig.ReadUncommitted, compulsory); Configuration.ConfigEncryption(xmlElement, "Encryption", dbConfig, compulsory); Configuration.ConfigBool(xmlElement, "Truncate", ref dbConfig.Truncate, compulsory); Configuration.ConfigBool(xmlElement, "UseMVCC", ref dbConfig.UseMVCC, compulsory); }