RouteValueAttribute 클래스

정의

작업 또는 컨트롤러에 필요한 경로 값을 지정하는 특성입니다.

작업을 수행할 때 요청의 경로 데이터는 작업을 선택하기 위해 필요한 경로 데이터의 예상과 일치해야 합니다. 요청의 경로 데이터가 키와 일치하는 값을 생략하지 않는 한 지정된 키에 대한 경로 값이 없는 다른 모든 작업을 선택할 수 없습니다. 자세한 내용 및 예제는 를 참조 IRouteValueProvider 하세요.

컨트롤러에 배치되는 경우 작업에 의해 재정의되지 않는 한 제약 조건은 컨트롤러에서 정의한 모든 작업에 적용됩니다.

public ref class RouteValueAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Routing::IRouteValueProvider
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class RouteValueAttribute : Attribute, Microsoft.AspNetCore.Mvc.Routing.IRouteValueProvider
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type RouteValueAttribute = class
    inherit Attribute
    interface IRouteValueProvider
Public MustInherit Class RouteValueAttribute
Inherits Attribute
Implements IRouteValueProvider
상속
RouteValueAttribute
파생
특성
구현

생성자

RouteValueAttribute(String, String)

RouteValueAttribute를 만듭니다.

속성

RouteKey

경로 값 키입니다.

RouteValue

경로 값입니다. 또는 비어 있는 경우 null 와 연결된 RouteKey 경로 값이 없거나 null이어야 합니다.

적용 대상