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 6
6
namespace Microsoft . AspNetCore . Mvc . Infrastructure
7
7
{
8
8
/// <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
10
10
/// that the parameter or property is used to set the "value" for ActionResult.
11
11
/// <para>
12
12
/// 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.
14
14
/// </para>
15
15
/// <para>
16
16
/// This attribute is intentionally marked Inherited=false since the analyzer does not walk the inheritance graph.
17
17
/// </para>
18
18
/// </summary>
19
19
/// <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>
22
36
/// </example>
23
37
[ AttributeUsage ( AttributeTargets . Parameter | AttributeTargets . Property , AllowMultiple = false , Inherited = false ) ]
24
38
public sealed class ActionResultObjectValueAttribute : Attribute
You can’t perform that action at this time.
0 commit comments