Exemple #1
0
        private void read(JSONDataMap data)
        {
            if (data == null || data.Count == 0 || data.Count > 1)
            {
                throw new ConfigException(StringConsts.CONFIG_JSON_MAP_ERROR);
            }

            var root = data.First();
            var sect = root.Value as JSONDataMap;

            if (sect == null)
            {
                throw new ConfigException(StringConsts.CONFIG_JSON_MAP_ERROR);
            }

            m_Root = buildSection(root.Key, sect, null);
            m_Root.ResetModified();
        }
Exemple #2
0
        private void read(JSONDataMap data)
        {
            if (data==null || data.Count==0 || data.Count>1)
            throw new ConfigException(StringConsts.CONFIG_JSON_MAP_ERROR);

              var root = data.First();
              var sect = root.Value as JSONDataMap;
              if (sect==null)
            throw new ConfigException(StringConsts.CONFIG_JSON_MAP_ERROR);

              m_Root = buildSection(root.Key, sect, null);
              m_Root.ResetModified();
        }