omniaretail / nimator

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

Unclear that (currently) ICheckResult and ILayerResult instances should override ToString #2

Closed jeroenheijmans closed 8 years ago

jeroenheijmans commented 8 years ago

It's nice that there's an interface for each level of result (top level, layers, checks), but the interface doesn't say anything about how the results can be rendered.

The default implementation of the top two levels (NimatorResult and LayerResult) now both do some string magic to render the end result (i.e. when NimatorResult.RenderPlainText() is called), but internally they use ToString() on the levels below them. Effecitively:

or they will not be rendered in the RennderPlainText() output properly.

Being rendered seems to be a main task of both levels of results, so the interfaces for them should probably be explicit too. Perhaps both of them need to have their own RenderPlainText() definitions, so that it is clear that implementations need that to render the result properly?