HighwayFramework / Highway.Data

The fastest and smoothest way to great architecture
http://hwyfwk.com
MIT License
73 stars 30 forks source link

Highway.Config #114

Closed trayburn closed 4 years ago

trayburn commented 6 years ago

Rough sketch of objects:

ConfigManager
+ Get(key)
+ Set(key, value)
+ Clear(key, deep)
+ GetSpecific(env, store, key)
+ SetSpecific(env, store, key, value)
+ ClearSpecific(env, store, key)
+ GetEnvironments()
+ GetStores(env)
+ GetKeys(env, store)

ConfigStore
+ Clear(key)
+ Get(key)
+ Set(key, value)
+ GetKeys()

Also need Builder options which nominally should look something like:

new ConfigManagerOptionsBuilder()
  .Add("development", cfg => {
    cfg.AddInMemoryStore()
      .AddInMemoryCache(new InMemoryCacheOptionsBuilder(x => {
        x.SetTimeout(new Timespan(0,0,5));
      }).Options());
  }).Options;

Need to support at least:

Important Opinions