File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
src/Mvc/Mvc.Core/src/Infrastructure Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 66namespace Microsoft . AspNetCore . Mvc . Infrastructure
77{
88 /// <summary>
9- /// Attribute annoted on ActionResult constructor, helper method parameters, and properties to indicate
9+ /// Attribute annotated on ActionResult constructor, helper method parameters, and properties to indicate
1010 /// that the parameter or property is used to set the "value" for ActionResult.
1111 /// <para>
1212 /// Analyzers match this parameter by type name. This allows users to annotate custom results \ custom helpers
13- /// with a user defined attribute without having to expose this type.
13+ /// with a user- defined attribute without having to expose this type.
1414 /// </para>
1515 /// <para>
1616 /// This attribute is intentionally marked Inherited=false since the analyzer does not walk the inheritance graph.
1717 /// </para>
1818 /// </summary>
1919 /// <example>
20- /// BadObjectResult([ActionResultObjectValueAttribute] object value)
21- /// ObjectResult { [ActionResultObjectValueAttribute] public object Value { get; set; } }
20+ /// Annotated constructor parameter:
21+ /// <code>
22+ /// public BadRequestObjectResult([ActionResultObjectValue] object error)
23+ /// :base(error)
24+ /// {
25+ /// StatusCode = DefaultStatusCode;
26+ /// }
27+ /// </code>
28+ /// Annotated property:
29+ /// <code>
30+ /// public class ObjectResult : ActionResult, IStatusCodeActionResult
31+ /// {
32+ /// [ActionResultObjectValue]
33+ /// public object Value { get; set; }
34+ /// }
35+ /// </code>
2236 /// </example>
2337 [ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false , Inherited = false ) ]
2438 public sealed class ActionResultObjectValueAttribute : Attribute
You can’t perform that action at this time.
0 commit comments