HealthCheck icon indicating copy to clipboard operation
HealthCheck copied to clipboard

New modules + refactoring

Open takinosaji opened this issue 7 years ago • 4 comments

  1. HealthCheck.Mvc module: convenient extension with ready to use controller, view for healthcheck page for your MVC application easy configurable and injectable into main application by several lines of code.
  2. HealthCheck.WebApi module: convenient extension with ready to use controller producing json result for your WebApi application easy configurable and injectable into main application by several lines of code.
  3. HealthCheckResult is now in failed state if no checks spotted
  4. Configurators added
  5. CheckerBase was changed. Properties converted to constructor parameters to encourage using of IoC.

takinosaji avatar Jun 08 '17 14:06 takinosaji

@Hihaj thx for response.

The goal behind refactoring is making namespaces self explanatory and typical. It's common practice that extension classes are located in Extension folder and sub namespace eventually. Ofc when developing project further we should think about compatibility but i suppose that we should not hesitate to improve existing codebase. Thx nuget helps us moving forward with letter versions of packages and preserving existing versions.

As for C# type aliases i use class names instead of keywords deliberately on my opinion it makes code more consistent and allows to avoid confusion with changing of meaning of certain keywords in next versions of dotnet. Still i wont argue about it and will fix it back as you asking.

As for check result - well i am eager to use IoC and polymorphism as much as i can. In future we can have different types of ICheckResults. For instance HealthCheckResult i thought must be ICheckResult, maybe future SectionChecks could also implement this interface. I agree that it is supposed to be just a DTO and thus it should not have any behavior => interface

takinosaji avatar Jun 13 '17 15:06 takinosaji

@Hihaj Hi, would be great to see those changes go live

minorum avatar Oct 06 '17 12:10 minorum

@minorum Which of the changes are you referring to specifically?

fjeldstad avatar Oct 07 '17 17:10 fjeldstad

Specifically the Mvc and WebApi modules

minorum avatar Oct 08 '17 21:10 minorum