From e7ca49c95e5a8f9ae5f7a4817e1e34283d56bf61 Mon Sep 17 00:00:00 2001
From: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Date: Wed, 3 Jun 2020 08:42:53 -0500
Subject: [PATCH] Improve XML docs for ActionResultObjectValueAttribute
(#22479)
---
.../ActionResultObjectValueAttribute.cs | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/Mvc/Mvc.Core/src/Infrastructure/ActionResultObjectValueAttribute.cs b/src/Mvc/Mvc.Core/src/Infrastructure/ActionResultObjectValueAttribute.cs
index dc1891561a..7743399b0d 100644
--- a/src/Mvc/Mvc.Core/src/Infrastructure/ActionResultObjectValueAttribute.cs
+++ b/src/Mvc/Mvc.Core/src/Infrastructure/ActionResultObjectValueAttribute.cs
@@ -6,19 +6,33 @@ using System;
namespace Microsoft.AspNetCore.Mvc.Infrastructure
{
///
- /// Attribute annoted on ActionResult constructor, helper method parameters, and properties to indicate
+ /// Attribute annotated on ActionResult constructor, helper method parameters, and properties to indicate
/// that the parameter or property is used to set the "value" for ActionResult.
///
/// Analyzers match this parameter by type name. This allows users to annotate custom results \ custom helpers
- /// with a user defined attribute without having to expose this type.
+ /// with a user-defined attribute without having to expose this type.
///
///
/// This attribute is intentionally marked Inherited=false since the analyzer does not walk the inheritance graph.
///
///
///
- /// BadObjectResult([ActionResultObjectValueAttribute] object value)
- /// ObjectResult { [ActionResultObjectValueAttribute] public object Value { get; set; } }
+ /// Annotated constructor parameter:
+ ///
+ /// public BadRequestObjectResult([ActionResultObjectValue] object error)
+ /// :base(error)
+ /// {
+ /// StatusCode = DefaultStatusCode;
+ /// }
+ ///
+ /// Annotated property:
+ ///
+ /// public class ObjectResult : ActionResult, IStatusCodeActionResult
+ /// {
+ /// [ActionResultObjectValue]
+ /// public object Value { get; set; }
+ /// }
+ ///
///
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
public sealed class ActionResultObjectValueAttribute : Attribute