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¶
- Choose between the header view and the error view (BR-BOLMIDDLEWARE-017).
- Pass the policy model to the
BolPolicyHeaderdefault view, which shows the dropdown or label (BR-BOLMIDDLEWARE-012).
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