Skip to content

raulnq/Jal.Settings

Repository files navigation

Jal.Settings Build status NuGet

Just another library to get the settings of your application

How to use?

Note: The default implementation work with the App.config and the Web.config files.

Default

Resolve a instance of the ISettingsExtractor interface

var settingsExtractor = SettingsExtractor.Create();

Get a setting for the config file

var appName = settingsExtractor.Get<string>("ApplicationName",false, string.Empty);

Castle Windsor NuGet

Setup the Castle Windsor container

var container = new WindsorContainer();

Install the Jal.Settings.Installer library

container.Install(new SettingsInstaller());

Resolve a instance of the ISettingsExtractor interface

var settingsExtractor = container.Resolve<ISettingsExtractor>();

Get a setting for the config file

var appName = settingsExtractor.Get<string>("ApplicationName",false, string.Empty);

LightInject NuGet

Setup the LightInject container

var container = new ServiceContainer();

Install the Jal.Settings.Installer library

container.RegisterFrom<SettingsCompositionRoot>();

Resolve a instance of the ISettingsExtractor interface

var settingsExtractor = container.GetInstance<ISettingsExtractor>();

Get a setting for the config file

var appName = settingsExtractor.Get<string>("ApplicationName",false, string.Empty);

About

Just another library to get the settings of your application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages