ConfigReader
ConfigReader copied to clipboard
Verify that all the parameters are mapped
When used without default values, only with the interface. In case some parameter is missing in the config file, throw an exception saying that parameter is missing.
public interface IMailNotificationSettings{ string Username { get; } string Password { get; } }
ConfigurationReader configReader = new ConfigurationReader().SetupConfigOf<IMailNotificationSettings>(); IMailNotificationSettings mySettings = configReader.ConfigBrowser.Get<IMailNotificationSettings>();
Above lines should throw an exception since Password is missing in config file
Hey @borismod, I'm not actively maintaining this library any more, but would be happy to accept a pull request.