-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Switch off the default diagnostic provider #1106
Switch off the default diagnostic provider #1106
Conversation
Remove the default testing diagnostic provider if another implementation is found.
I know I'm way too tired because I am asking this, but for what scenario is this modification intended? Thanks! |
Its because there's no way to hide/disable it.. Its only there to act as a sample - we thought about pulling it out, but having it enabled if nothing else is found is quite nice. -----Original Message----- I know I'm way too tired because I am asking this, but for what scenario is this modification intended? Thanks! |
Sorry, i could've explained it better. We're embedding Nancy in one of our products, and i want to improve our diagnostic situation to make our lives better, but i don't want to have customers (or my co-workers) seeing the example diagnostics provider. It wouldn't be a big deal, but i prefer a little more polish in my work. Also, i'm not sure how to turn it off. Is it possible to get rid of it by adding it to the ignored assemblies? Being unable to easily disable this example provider doesn't feel very SDHP to me either, i want to help Nancy get better, even if it's something small 😉 |
Just looked at the code - I would probably exclude the nancy assembly from the scan of diagnostics providers, then just do an Any check in the DefaultDiagnostics ctor that adds the default ones in if there aren't any passed in - rather than trying to remove them if there's other specified. |
This will exclude the testing diagnostics provider from Nancy if there's another interactive diagnostics provider available.
This reverts commit 9d8f13a.
i don't think i did it exactly the way you were suggesting, but is this better @grumpydev ? |
Switch off the default diagnostic provider
Remove the default testing diagnostic provider if another implementation
is found.
i'm not sure if this is the way we want to do it, but here it is for the sake of discussion. What do you think @grumpydev?