From 3a6541af101893505f01a8b31955ce85ac53f192 Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Fri, 10 Jun 2016 10:30:59 -0700 Subject: [PATCH] Address PR comments --- .../ModelBinding/BindNeverAttribute.cs | 4 +++- .../ModelBinding/BindRequiredAttribute.cs | 4 +++- .../ViewComponentAttribute.cs | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindNeverAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindNeverAttribute.cs index 4d496dc26c..6fa4dcf60a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindNeverAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindNeverAttribute.cs @@ -6,7 +6,9 @@ using System; namespace Microsoft.AspNetCore.Mvc.ModelBinding { /// - /// Indicates that the property should be excluded from model binding. + /// Indicates that a property should be excluded from model binding. When applied to a property, the model binding + /// system excludes that property. When applied to a type, the model binding system excludes all properties of that + /// type. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class BindNeverAttribute : BindingBehaviorAttribute diff --git a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindRequiredAttribute.cs b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindRequiredAttribute.cs index f374bb5bc1..0770991b54 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindRequiredAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/ModelBinding/BindRequiredAttribute.cs @@ -6,7 +6,9 @@ using System; namespace Microsoft.AspNetCore.Mvc.ModelBinding { /// - /// Indicates that the property is required for model binding. + /// Indicates that a property is required for model binding. When applied to a property, the model binding system + /// requires a value for that property. When applied to a type, the model binding system requires values for all + /// properties of that type. /// [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = false, Inherited = true)] public sealed class BindRequiredAttribute : BindingBehaviorAttribute diff --git a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponentAttribute.cs b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponentAttribute.cs index 4711975c88..44e701dfaf 100644 --- a/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponentAttribute.cs +++ b/src/Microsoft.AspNetCore.Mvc.ViewFeatures/ViewComponentAttribute.cs @@ -6,13 +6,15 @@ using System; namespace Microsoft.AspNetCore.Mvc { /// - /// Indicates the class is a view component and optionally specifies the component's name. + /// Indicates the class and all subclasses are view components. Optionally specifies a view component's name. If + /// defining a base class for multiple view components, associate this attribute with that base. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public class ViewComponentAttribute : Attribute { /// - /// Gets or sets the name of the view component. + /// Gets or sets the name of the view component. Do not supply a name in an attribute associated with a view + /// component base class. /// public string Name { get; set; } }