HealthReportingData GetReport( ReportTypes details )
Parameters
- details
- Details to report
Return Value
runtime reporting values
HealthReportingData GetReport( ReportTypes details )
services.AddControllersWithViews() .AddNewtonsoftJson(options=> { options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; options.SerializerSettings.Formatting = Formatting.Indented; });
public class HealthController : Controller { private readonly IFireWall _fireWall; public HealthController(IFireWall fireWall) { _fireWall = fireWall; } [HttpGet] [Produces("text/plain")] public string Index() { //get all but missing security alerts and missing data subscriptions return _fireWall.Report(ReportTypes.DEFAULT); } [HttpGet] public JsonResult Json() { var items = ReportTypes.ALL &~ ReportTypes.EndPoints; var data = _fireWall.GetReport(items); return Json(data); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2