public ActionResult Index() { var viewModel = _healthService.CreateModel(); if (Request.AcceptTypes.Contains("application/json")) { return(Content(JsonConvert.SerializeObject(viewModel))); } return(View(viewModel)); }
// GET: Health public ActionResult Start() { var viewModel = _healthService.CreateModel(); Assembly assembly = Assembly.GetExecutingAssembly(); var version = assembly.GetName().Version.ToString(); var fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location); viewModel.BuildId = _healthSettings.BuildId; viewModel.Version = fileVersionInfo.ProductVersion; viewModel.AssemblyVersion = version; if (Request.AcceptTypes.Contains("application/json")) { return(Content(JsonConvert.SerializeObject(viewModel))); } return(View(viewModel)); }