PageConventionCollectionExtensions.AuthorizePage 方法

定义

重载

AuthorizePage(PageConventionCollection, String)

需要指定页面的授权。

AuthorizePage(PageConventionCollection, String, String)

对于具有指定名称的页面,需要具有指定策略的授权。

AuthorizePage(PageConventionCollection, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

需要指定页面的授权。

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizePage (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName);
static member AuthorizePage : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizePage (conventions As PageConventionCollection, pageName As String) As PageConventionCollection

参数

pageName
String

页名称。

返回

PageConventionCollection

适用于

AuthorizePage(PageConventionCollection, String, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

对于具有指定名称的页面,需要具有指定策略的授权。

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizePage (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string pageName, string policy);
static member AuthorizePage : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizePage (conventions As PageConventionCollection, pageName As String, policy As String) As PageConventionCollection

参数

pageName
String

页名称。

policy
String

授权策略。

返回

PageConventionCollection

适用于