Пример #1
0
 public static void Config(XmlElement xmlElement,
                           ref CursorConfig cursorConfig, bool compulsory)
 {
     Configuration.ConfigIsolation(xmlElement,
                                   "IsolationDegree", ref cursorConfig.IsolationDegree,
                                   compulsory);
     Configuration.ConfigCachePriority(xmlElement,
                                       "Priority", ref cursorConfig.Priority, compulsory);
     Configuration.ConfigBool(xmlElement,
                              "SnapshotIsolation", ref cursorConfig.SnapshotIsolation,
                              compulsory);
     Configuration.ConfigBool(xmlElement,
                              "WriteCursor", ref cursorConfig.WriteCursor,
                              compulsory);
 }
Пример #2
0
        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);
        }