Skip to content

BolPolicyHeaderViewComponent

View component that renders the policy header bar from a BolPolicyModel, or the error view when an error message is passed. It is invoked by the policy layouts.

Purpose

Context

  • Namespace: BolMiddleware.Components
  • Assembly/package: BolMiddleware

Public members

Member Signature Purpose
InvokeAsync Task<IViewComponentResult> InvokeAsync(BolPolicyModel model, string? errorMessage) Returns the Error view with the message when one is given, otherwise the default header view with the model.

Behavioral notes

  • Declared async but contains no await; it completes synchronously.

Constraints and usage notes

  • Invoked from layouts with the page model as argument.

Sources

  • src/BolMiddleware/ViewComponents/BolPolicyHeaderViewComponent.cs