You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
The second issue is a few lines later, it actually throws an exception whenever it cannot parse the enum.
elseif(Enum.TryParse<LogLevel>(value,outlevel)){returntrue;}else{varmessage=$"Configuration value '{value}' for category '{name}' is not supported.";thrownewInvalidOperationException(message);}
I think that's bad.
For the initial application startup, this might be fine, but if you work with reload tokens, the whole logic blows up if you make one mistake one time:
If the configuration has been updated with a wrong configuration value, the token triggers but the code above throws an exception. The exception doesn't get logged or shown anywhere because it's an async "somewhere" task doing the checks...
Because of the exception, no new token and handler get created afterwards, and I have to restart the application to have it read the updated configuration again...