obj
Extension methods to enable support for hosting server-side and WebAssembly Bolero components in ASP.NET Core.
Static member | Description |
Full Usage:
ServerComponentsExtensions.AddBoleroHost(this, ?server, ?prerendered, ?devToggle)
Parameters:
IServiceCollection
?server : bool
-
If true, use server-side Bolero; if false, use WebAssembly. Default is false.
?prerendered : bool
-
If true, prerender the initial view in the served HTML. Default is true.
?devToggle : bool
-
If true and ASP.NET Core is running in development environment, query parameter ?server=bool
can be passed to use the given mode.
Returns: IServiceCollection
|
|
Full Usage:
ServerComponentsExtensions.BoleroPage(_this, page)
Parameters:
Controller
page : Node
-
The page to return.
Returns: BoleroPageResult
|
|
Full Usage:
ServerComponentsExtensions.MapFallbackToBolero(this, page)
Parameters:
IEndpointRouteBuilder
page : HttpContext -> Node
-
A function that generates the page to serve.
Returns: IEndpointConventionBuilder
|
Adds a route endpoint that will match requests for non-file-names with the lowest possible priority. The request will be routed to a Bolero page.
|
Full Usage:
ServerComponentsExtensions.MapFallbackToBolero(this, page)
Parameters:
IEndpointRouteBuilder
page : Node
-
The page to serve.
Returns: IEndpointConventionBuilder
|
Adds a route endpoint that will match requests for non-file-names with the lowest possible priority. The request will be routed to a Bolero page.
|
Full Usage:
ServerComponentsExtensions.RenderBoleroScript(html, config)
Parameters:
IHtmlHelper
config : IBoleroHostConfig
-
The injected Bolero hosting configuration.
Returns: IHtmlContent
|
|
Full Usage:
ServerComponentsExtensions.RenderComponentAsync(html, config, ?parameters)
Parameters:
IHtmlHelper
-
The injected HTML helper.
config : IBoleroHostConfig
-
The injected Bolero hosting configuration.
?parameters : obj
-
An Object containing the parameters to pass to the component.
Returns: Task<IHtmlContent>
|
|
Full Usage:
ServerComponentsExtensions.RenderComponentAsync(html, componentType, config, ?parameters)
Parameters:
IHtmlHelper
-
The injected HTML helper.
componentType : Type
-
The Bolero component type.
config : IBoleroHostConfig
-
The injected Bolero hosting configuration.
?parameters : obj
-
An Object containing the parameters to pass to the component.
Returns: Task<IHtmlContent>
|
|
Full Usage:
ServerComponentsExtensions.RenderPage(this, page)
Parameters:
HttpContext
page : Node
-
The page to render.
Returns: Task
|
|