共用方式為


MvcRazorPagesMvcBuilderExtensions.AddRazorPagesOptions 方法

定義

為應用程式設定一 RazorPagesOptions 組 。

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddRazorPagesOptions (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions> setupAction);
static member AddRazorPagesOptions : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddRazorPagesOptions (builder As IMvcBuilder, setupAction As Action(Of RazorPagesOptions)) As IMvcBuilder

參數

setupAction
Action<RazorPagesOptions>

設定 的 RazorPagesOptions 動作。

傳回

IMvcBuilder

適用於