共用方式為


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

適用於