fclp / fluent-command-line-parser

A simple, strongly typed .NET C# command line parser library using a fluent easy to use interface
Other
530 stars 85 forks source link

There should be a ConfigurationProvider #104

Open MovGP0 opened 5 years ago

MovGP0 commented 5 years ago

There should be a reference implementation of Microsoft.Extensions.Configuration.IConfigurationProvider that works with the FluentCommandLineParser class.

https://andrewlock.net/creating-a-custom-iconfigurationprovider-in-asp-net-core-to-parse-yaml/

siywilliams commented 5 years ago

Looks interesting but I've not come across IConfigurationProvider myself yet.

My concern is adding a dependency to Microsoft.Extensions.Configuration (FCLP currently has no external dependencies, something I've tried to maintain).

The correct way to go about this would be to create another extension project, for example something like FluentCommandLineParser.ConfigurationProvider which would provide the extensions to add this functionality without polluting the main project.

astrohart commented 3 years ago

@siywilliams that is the way to go. Separate extension project and in its own NuGet package. This way, I can add that to my project only if I want/need it.