omniaretail / nimator

Light-weight adhoc framework for creating monitoring apps with c-sharp based system-checks.
MIT License
10 stars 9 forks source link

Empty NotifierSettings is different from absent NotifierSettings #5

Closed jeroenheijmans closed 8 years ago

jeroenheijmans commented 8 years ago

If you have this first version for settings...

{
  "Layers": [{ "Name": "Demo layer 1", "Checks": [] }]
}

...then you will effectively get a ConsoleNotifier because the default constructors instantiate one.

However, this second version for settings...

{
  "Notifiers": [ ],
  "Layers": [{ "Name": "Demo layer 1", "Checks": [] }]
}

...will not notify anything (see also #4).

The issue is that the difference in behavior can be quite confusing. Once #4 is fixed we could have the first version also default to zero notifiers. What's possible both before and after #4 is that the second version also gets a default notifier.