Exemple #1
0
        internal void Set(TPath path, object value, IConfigSource source)
        {
            path.CheckNotNull(nameof(path));
            value.CheckNotNull(nameof(value));

            this.Set(tbl => path.SetValue(tbl, TomlObject.CreateFrom(tbl.Root, value, null)), source);
        }
Exemple #2
0
        internal void Set(TPath path, object value)
        {
            path.CheckNotNull(nameof(path));
            value.CheckNotNull(nameof(value));

            var src = this.TryGetSource(path);

            bool notStoredInConfigYet = this.TryGetSource(path) == null;

            if (notStoredInConfigYet)
            {
                this.Set(path, value, this.persistable.RootSource);
            }
            else
            {
                this.Set(tbl => path.SetValue(tbl, TomlObject.CreateFrom(tbl.Root, value, null)));
            }
        }