memstate
memstate copied to clipboard
Use callbacks for setting properties on settings objects
Settings are populated by the configuration subsystem. This means users don't create the settings objects, instead they obtain a reference to them by calling Config.Current.GetSettings<TSettings>()
.
This is ugly but can be hidden from the user by accepting an Action<TSetting> to various methods, for example var engine = Engine.For<MyModel>((EngineSettings s) => s.StreamName="myname") ;
or Config.Current.Configure<EngineSettings>(s => s.StreamName)