ApiResourceCollection.AddApiResource 方法

定义

添加新的外部注册 API。

public:
 void AddApiResource(System::String ^ name, Action<Microsoft::AspNetCore::ApiAuthorization::IdentityServer::ApiResourceBuilder ^> ^ configure);
public void AddApiResource (string name, Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder> configure);
member this.AddApiResource : string * Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder> -> unit
Public Sub AddApiResource (name As String, configure As Action(Of ApiResourceBuilder))

参数

name
String

API 的名称。

configure
Action<ApiResourceBuilder>

用于 Action<T> 配置外部注册的 API 的 。

适用于