public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) { if (!(_html is IViewContextAware htmlHelper)) { throw new Exception("Uncontextualizable IHtmlHelper."); } htmlHelper.Contextualize(ViewContext); var viewModel = new VercelLatestDeploymentViewModel { InitializationStatus = _deploymentService.GetInitializationStatus(), }; if ( viewModel.InitializationStatus.IsReadConfigured ) { try { viewModel.LatestDeployment = await _deploymentService.GetLatestProductionDeploymentAsync(); viewModel.IsWaitingForDeployment = _deploymentStatusService.IsWaitingForDeployment(); } catch (Exception e) { _logger.LogWarning(e, "Couldn't get latest production deployment."); } } var renderedHtml = await _html.PartialAsync("VercelLatestDeployment", viewModel); output.TagName = null; output.Content.SetHtmlContent(renderedHtml); }