ChrisMissal / Formo

Formo allows you to use your configuration file as a dynamic object. Turn your web.config or application settings into a rich, dynamic object.
http://chrismissal.com/Formo/
MIT License
259 stars 33 forks source link

Use provided value when using generic method call #27

Closed thomasvm closed 10 years ago

thomasvm commented 10 years ago

When passing a default value to a configuration method call the parameter must be a string to get correctly converted. e.g.

var numberOfRetries = configuration.NumberOfRetries<int>("20");

This pull request allows you to pass in the requested type as a parameter. e.g.

var numberOfRetries = configuration.NumberOfRetries<int>(20);
ChrisMissal commented 10 years ago

Excellent, thank you @thomasvm! This also closes #25 as reported by @mikecole

thomasvm commented 10 years ago

You're welcome @ChrisMissal! Formo has become my de facto choice for reading configuration, so I'm glad to give back.

mikecole commented 10 years ago

Yes, thank you @thomasvm!