ActionResultObjectValueAttribute 클래스

정의

ActionResult 생성자, 도우미 메서드 매개 변수 및 속성에 주석이 추가된 특성은 매개 변수 또는 속성이 ActionResult의 "값"을 설정하는 데 사용됨을 나타냅니다.

분석기는 이 매개 변수를 형식 이름으로 일치합니다. 이렇게 하면 사용자가 이 형식을 노출하지 않고도 사용자 정의 특성으로 사용자 지정 결과 \ 사용자 지정 도우미에 주석을 달 수 있습니다.

분석기가 상속 그래프를 탐색하지 않으므로 이 특성은 의도적으로 Inherited=false로 표시됩니다.

public ref class ActionResultObjectValueAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed class ActionResultObjectValueAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)>]
type ActionResultObjectValueAttribute = class
    inherit Attribute
Public NotInheritable Class ActionResultObjectValueAttribute
Inherits Attribute
상속
ActionResultObjectValueAttribute
특성

예제

주석이 추가된 생성자 매개 변수:

public BadRequestObjectResult([ActionResultObjectValue] object error)
    :base(error)
{
    StatusCode = DefaultStatusCode;
}

주석이 추가된 속성:

public class ObjectResult : ActionResult, IStatusCodeActionResult
{
    [ActionResultObjectValue]
    public object Value { get; set; }
}

생성자

ActionResultObjectValueAttribute()

ActionResult 생성자, 도우미 메서드 매개 변수 및 속성에 주석이 추가된 특성은 매개 변수 또는 속성이 ActionResult의 "값"을 설정하는 데 사용됨을 나타냅니다.

분석기는 이 매개 변수를 형식 이름으로 일치합니다. 이렇게 하면 사용자가 이 형식을 노출하지 않고도 사용자 정의 특성으로 사용자 지정 결과 \ 사용자 지정 도우미에 주석을 달 수 있습니다.

분석기가 상속 그래프를 탐색하지 않으므로 이 특성은 의도적으로 Inherited=false로 표시됩니다.

적용 대상