ActionMethodSelectorAttribute.IsValidForRequest 方法

定义

确定操作选择是否对指定的路由上下文有效。

public:
 abstract bool IsValidForRequest(Microsoft::AspNetCore::Routing::RouteContext ^ routeContext, Microsoft::AspNetCore::Mvc::Abstractions::ActionDescriptor ^ action);
public abstract bool IsValidForRequest (Microsoft.AspNetCore.Routing.RouteContext routeContext, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor action);
abstract member IsValidForRequest : Microsoft.AspNetCore.Routing.RouteContext * Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor -> bool
Public MustOverride Function IsValidForRequest (routeContext As RouteContext, action As ActionDescriptor) As Boolean

参数

routeContext
RouteContext

路由上下文。

action
ActionDescriptor

有关操作的信息。

返回

true 如果操作选择对指定的上下文有效,则为 ;否则为 false

适用于