It can two way bind configuration.
The MS configuration provider file -> string map/class properties way to fetch configuration, and the project support string map/class properties -> file way to save the configuration change. And it can dynamic proxy the configuration, it can bind at wpf, xamarin, uwp... When it use configuration UI! And it can auto save, when change the configuration!
And it support proxy setting class, simple modify class property to change properties, and auto save the configuration!
Can reversal store is i modify the MS configuration lib to make it support, and proxy use MS IL to dynamic create proxy class.
The
NameTransfer
is very import to provider find configuration path!
You can see sample\TwoWayBind
Or wpf project sample\TwoWayBindWpf
use in wpf binding
var builder = new SavableConfiurationBuilder();
builder.AddJsonFile("appsettings.json", false, true);
//Make configuration
var root = builder.Build();
//Create proxy and create proxy object
var value = root.AutoCreateProxy<DbConnection>();
root.BindTwoWay(value, JsonChangeTransferCondition.Instance);
- Add unit test, to conver
100%
codes - To make easy use it
- Add object <-> string converter like wpf
IValueConverter
- Add more provider transfer (Now only json)
Ao.SavableConfig Ao.SavableConfig.Binder Ao.SavableConfig.Json