Skip to content

Commit eee77a8

Browse files
authored
Improve XML docs for ActionResultStatusCodeAttribute (#22598)
1 parent f56cad0 commit eee77a8

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Mvc/Mvc.Core/src/Infrastructure/ActionResultStatusCodeAttribute.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,24 @@
66
namespace Microsoft.AspNetCore.Mvc.Infrastructure
77
{
88
/// <summary>
9-
/// Attribute annoted on ActionResult constructor and helper method parameters to indicate
9+
/// Attribute annotated on ActionResult constructor and helper method parameters to indicate
1010
/// that the parameter is used to set the "statusCode" for the 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-
/// StatusCodeResult([ActionResultStatusCodeParameter] int statusCode)
20+
/// Annotated constructor parameter:
21+
/// <code>
22+
/// public StatusCodeResult([ActionResultStatusCode] int statusCode)
23+
/// {
24+
/// StatusCode = statusCode;
25+
/// }
26+
/// </code>
2127
/// </example>
2228
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
2329
public sealed class ActionResultStatusCodeAttribute : Attribute

0 commit comments

Comments
 (0)