共用方式為


PolicyServiceCollectionExtensions.AddAuthorizationBuilder 方法

定義

將授權服務新增至指定的 IServiceCollection

public static Microsoft.AspNetCore.Authorization.AuthorizationBuilder AddAuthorizationBuilder (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAuthorizationBuilder : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Authorization.AuthorizationBuilder
<Extension()>
Public Function AddAuthorizationBuilder (services As IServiceCollection) As AuthorizationBuilder

參數

services
IServiceCollection

要新增服務的 IServiceCollection

傳回

AuthorizationBuilder,以便鏈結其他呼叫。

適用於