SpaApplicationBuilderExtensions.UseSpa(IApplicationBuilder, Action<ISpaBuilder>) 方法

定义

通过返回 SPA 中"单页应用程序"的默认页,处理中间件链中此点 (请求) 。

此中间件应放置在链的后期,以便优先处理用于提供静态文件、MVC 操作等的其他中间件。

public:
[System::Runtime::CompilerServices::Extension]
 static void UseSpa(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Action<Microsoft::AspNetCore::SpaServices::ISpaBuilder ^> ^ configuration);
public static void UseSpa (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Action<Microsoft.AspNetCore.SpaServices.ISpaBuilder> configuration);
static member UseSpa : Microsoft.AspNetCore.Builder.IApplicationBuilder * Action<Microsoft.AspNetCore.SpaServices.ISpaBuilder> -> unit
<Extension()>
Public Sub UseSpa (app As IApplicationBuilder, configuration As Action(Of ISpaBuilder))

参数

configuration
Action<ISpaBuilder>

将调用此回调,以便在此 SPA 的上下文中注册其他中间件。

适用于