Skip to content

Conversation

@Mates1500
Copy link
Contributor

The way config key strings and defaults were hamfisted (and sometimes repeated) all over the codebase didn't seem very elegant to me, so I've abstracted it into a couple of interfaces and moved all the parsing/implementation business into the MiNET.Console assembly.

I've also grouped it into logical blocks for better readability and usability.

- Now it's way easier to see the config defaults, usages all in one place
- Eliminated a bunch of repeated code
- All config properties are easily accessible from the debugger
- Config properties are defined in contracts/interfaces
@Mates1500
Copy link
Contributor Author

The old custom way of parsing has been removed (aside from the default value interpretation, which must stay) completely and replaced by the new .NET Core ConfigurationBuilder.
Therefore now we can add/switch stuff at will in MiNET.Console.Startup.BuildConfiguration(), like adding environment variables, command line arguments and such, see https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.configuration.iconfigurationbuilder?view=aspnetcore-2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants