Add-KrRazorPageService
SYNOPSIS
Adds Razor Pages service to the server.
SYNTAX
Items (Default)
Add-KrRazorPageService [-Server <KestrunHost>] [-RootDirectory <string>]
[-Conventions <IPageConvention[]>] [-PassThru] [<CommonParameters>]
Options
Add-KrRazorPageService -Options <RazorPagesOptions> [-Server <KestrunHost>] [-PassThru]
[<CommonParameters>]
ALIASES
This cmdlet has the following aliases, {{Insert list of aliases}}
DESCRIPTION
This cmdlet allows you to register Razor Pages with the Kestrun server. It can be used to serve dynamic web pages using Razor syntax.
EXAMPLES
EXAMPLE 1
$server | Add-KrRazorPageService -RootDirectory ‘/Pages’ -Conventions $conventions This example adds Razor Pages service to the server, specifying the root directory and conventions for the pages.
EXAMPLE 2
$server | Add-KrRazorPageService -Options $options This example adds Razor Pages service to the server using the specified RazorPagesOptions.
PARAMETERS
-Conventions
An array of page conventions to apply to the Razor Pages.
Type: Microsoft.AspNetCore.Mvc.ApplicationModels.IPageConvention[]
DefaultValue: '@()'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Items
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Options
The RazorPagesOptions to configure the Razor Pages service.
Type: Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Options
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PassThru
If specified, the cmdlet will return the modified server instance.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-RootDirectory
The root directory for the Razor Pages.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Items
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Server
The Kestrun server instance to which the Razor Pages service will be added.
Type: Kestrun.Hosting.KestrunHost
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
OUTPUTS
Kestrun.Hosting.KestrunHost
{{ Fill in the Description }}
NOTES
This cmdlet is used to register Razor Pages with the Kestrun server, allowing you to serve dynamic web pages using Razor syntax.