RemoteAttribute 构造函数

定义

重载

RemoteAttribute()

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String)

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String, String)

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String, String, String)

初始化 RemoteAttribute 类的新实例。

RemoteAttribute()

初始化 RemoteAttribute 类的新实例。

protected:
 RemoteAttribute();
protected RemoteAttribute ();
Protected Sub New ()

注解

适用于支持无路由、操作或控制器名称的 URL 生成的子类。

适用于

RemoteAttribute(String)

初始化 RemoteAttribute 类的新实例。

public:
 RemoteAttribute(System::String ^ routeName);
public RemoteAttribute (string routeName);
new Microsoft.AspNetCore.Mvc.RemoteAttribute : string -> Microsoft.AspNetCore.Mvc.RemoteAttribute
Public Sub New (routeName As String)

参数

routeName
String

生成客户端应在其中发送验证请求的 URL 时使用的路由名称。

注解

routeName在应用程序的任何区域中查找 。

适用于

RemoteAttribute(String, String)

初始化 RemoteAttribute 类的新实例。

public:
 RemoteAttribute(System::String ^ action, System::String ^ controller);
public RemoteAttribute (string action, string controller);
new Microsoft.AspNetCore.Mvc.RemoteAttribute : string * string -> Microsoft.AspNetCore.Mvc.RemoteAttribute
Public Sub New (action As String, controller As String)

参数

action
String

生成客户端应在其中发送验证请求的 URL 时使用的操作名称。

controller
String

生成客户端应在其中发送验证请求的 URL 时使用的控制器名称。

注解

action如果 或 controller 为 ,null则使用相应的环境值。

controller 当前区域中查找 。

适用于

RemoteAttribute(String, String, String)

初始化 RemoteAttribute 类的新实例。

public:
 RemoteAttribute(System::String ^ action, System::String ^ controller, System::String ^ areaName);
public RemoteAttribute (string action, string controller, string areaName);
new Microsoft.AspNetCore.Mvc.RemoteAttribute : string * string * string -> Microsoft.AspNetCore.Mvc.RemoteAttribute
Public Sub New (action As String, controller As String, areaName As String)

参数

action
String

生成客户端应在其中发送验证请求的 URL 时使用的操作名称。

controller
String

生成客户端应在其中发送验证请求的 URL 时使用的控制器名称。

areaName
String

包含 controller的区域的名称。

注解

action如果 或 controller 为 ,null则使用相应的环境值。

如果 areaNamenull,则 controller 查找根区域中的 。 RemoteAttribute(String, String)使用重载在当前区域中查找 controller 。 或者将当前区域的名称作为 areaName 参数显式传递到此重载。

适用于