internal IConfigSource TryGetSource(TPath path) { path.CheckNotNull(nameof(path)); var cfgTable = this.persistable.LoadSourcesTable(); var source = path.TryGet(cfgTable) as TomlSource; return(source?.Value); }
internal bool Clear(TPath path, bool fromAllSources) { if (path.TryGet(this.persistable.LoadSourcesTable()) is TomlSource ste) { if (fromAllSources) { bool cleared = false; foreach (var s in this.persistable.Sources) { cleared |= this.Clear(path, s); } } else { return(this.Clear(path, ste.Value)); } } else if (path.TryGet(this.persistable.Load()) is TomlTable tbl) { return(this.ClearTable(path, tbl, fromAllSources)); } return(false); }