Пример #1
0
        /// <summary>
        /// Creates a new config of <paramref name="type"/>
        /// </summary>
        /// <param name="type"></param>
        public VariableConfig(ConfigType type) : this()
        {
            Type = type;

            var(Fields, Values) = ConfigDataFactory.GenerateData(type);

            // set the field names with structual descriptions
            _fields = Fields;

            // generate all Locales
            var fields = DestructFieldNames(Fields);

            foreach (var locale in Enum.GetValues(typeof(Locale)))
            {
                Values[0] = locale.ToString().ToLower();
                PopulateCollection(fields, Values, (Locale)locale);
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a new config of <paramref name="type"/>
 /// </summary>
 /// <param name="type"></param>
 public KeyValueConfig(ConfigType type, uint build = 99999)
 {
     Type  = type;
     _data = ConfigDataFactory.GenerateData(type, build);
 }