From 8ab11bc073ed59906e45fb91dfb2574f0eeb2e1c Mon Sep 17 00:00:00 2001 From: dougbu Date: Sun, 3 Aug 2014 00:52:32 -0700 Subject: [PATCH] Correct XML comment syntax - fix problems at least with Roslyn compiler and VS IntelliSense or the Object Browser - `` generates nothing - `` at top level (outside ``) generates nothing - curly braces don't become angle brackets outside `` references - yeah, a point @yishaigalatzer asked about in a previous PR - `` is not valid - correct some invalid use of angle brackets and remove useless empty elements - correct unresolved XML comment references; generally, add namespace prefix Symptoms for some of the above issues included - generated XML comments such as ``, usually indicating an unclosed element - generated XML attributes such as `cref="!:..."`, indicating a broken reference - in a couple of cases we had ``; attribute should be `"name"` Few wording changes beyond - `"opening tag"` -> `"
start tag"` - `"closing
tag"` -> `" end tag"` Also correct two typos in `HtmlHelper` Will create a unit test to ensure XML syntax doesn't degrade going forward. Separate PR. - for now, check using `dir -r *.xml | sls '!'` --- .../ExpiringFileInfoCache.cs | 2 +- src/Microsoft.AspNet.Mvc.Core/FormContext.cs | 5 +- ...MediaTypeWithQualityHeaderValueComparer.cs | 20 +++---- .../IExpiringFileInfoCache.cs | 2 +- src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs | 13 +++-- .../ModelBinderDescriptor.cs | 4 +- .../OptionDescriptors/OptionDescriptor.cs | 8 +-- .../OutputFormatterDescriptor.cs | 2 +- .../ValueProviderFactoryDescriptor.cs | 2 +- .../OptionDescriptors/ViewEngineDescriptor.cs | 2 +- .../Rendering/Html/HtmlHelper.cs | 10 ++-- .../HtmlHelperDisplayNameExtensions.cs | 10 ++-- .../Rendering/HtmlHelperNameExtensions.cs | 4 +- .../Rendering/HtmlHelperValueExtensions.cs | 24 ++++---- .../Rendering/IHtmlHelper.cs | 58 +++++++++++-------- .../Rendering/IHtmlHelperOfT.cs | 55 ++++++++++-------- .../Rendering/MvcForm.cs | 2 +- .../ViewDataDictionary.cs | 3 +- .../Binders/GenericModelBinder.cs | 9 +-- .../Metadata/ModelMetadata.cs | 3 +- .../DataAnnotationsModelValidatorProvider.cs | 4 +- .../DataMemberModelValidatorProvider.cs | 4 +- .../Validation/ModelClientValidationRule.cs | 2 +- .../Rendering/HtmlHelperDisplayTextTest.cs | 3 +- .../TestController.cs | 4 +- 25 files changed, 136 insertions(+), 119 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/ExpiringFileInfoCache.cs b/src/Microsoft.AspNet.Mvc.Core/ExpiringFileInfoCache.cs index 00b1cf382d..e3f4e9f15e 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ExpiringFileInfoCache.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ExpiringFileInfoCache.cs @@ -10,7 +10,7 @@ using Microsoft.Framework.Runtime; namespace Microsoft.AspNet.Mvc.Core { /// - /// A default implementation for the + /// A default implementation for the interface. /// public class ExpiringFileInfoCache : IFileInfoCache { diff --git a/src/Microsoft.AspNet.Mvc.Core/FormContext.cs b/src/Microsoft.AspNet.Mvc.Core/FormContext.cs index b8e43e7c6c..5cb25663a3 100644 --- a/src/Microsoft.AspNet.Mvc.Core/FormContext.cs +++ b/src/Microsoft.AspNet.Mvc.Core/FormContext.cs @@ -3,7 +3,6 @@ using System; using System.Collections.Generic; -using Microsoft.AspNet.Mvc.Rendering; namespace Microsoft.AspNet.Mvc { @@ -14,8 +13,8 @@ namespace Microsoft.AspNet.Mvc private Dictionary _formData; /// - /// Property bag for any information you wish to associate with a {form/} in an - /// implementation or extension method. + /// Property bag for any information you wish to associate with a <form/> in an + /// implementation or extension method. /// public IDictionary FormData { diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs index 163d56efaf..65ecd3a84d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/MediaTypeWithQualityHeaderValueComparer.cs @@ -25,17 +25,15 @@ namespace Microsoft.AspNet.Mvc get { return _mediaTypeComparer; } } - /// - /// Compares two based on their quality value - /// (a.k.a their "q-value"). Values with identical q-values are considered equal (i.e the result is 0) - /// with the exception that sub-type wild-cards are considered less than specific media types and full - /// wild-cards are considered less than sub-type wild-cards. This allows to sort a sequence of - /// following their q-values in the order of specific - /// media types, sub-type wildcards, and last any full wild-cards. - /// - /// The first to compare. - /// The second to compare. - /// + /// + /// + /// Performs comparisons based on the arguments' quality values + /// (aka their "q-value"). Values with identical q-values are considered equal (i.e. the result is 0) + /// with the exception that subtype wildcards are considered less than specific media types and full + /// wildcards are considered less than subtype wildcards. This allows callers to sort a sequence of + /// following their q-values in the order of specific + /// media types, subtype wildcards, and last any full wildcards. + /// public int Compare(MediaTypeWithQualityHeaderValue mediaType1, MediaTypeWithQualityHeaderValue mediaType2) { if (object.ReferenceEquals(mediaType1, mediaType2)) diff --git a/src/Microsoft.AspNet.Mvc.Core/IExpiringFileInfoCache.cs b/src/Microsoft.AspNet.Mvc.Core/IExpiringFileInfoCache.cs index c60e4d74ab..c566219e27 100644 --- a/src/Microsoft.AspNet.Mvc.Core/IExpiringFileInfoCache.cs +++ b/src/Microsoft.AspNet.Mvc.Core/IExpiringFileInfoCache.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.Core /// Returns a cached for a given path. ///
/// The virtual path. - /// + /// The cached . IFileInfo GetFileInfo(string virtualPath); } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs index 6ea920b921..8861cd4ef9 100644 --- a/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/MvcOptions.cs @@ -50,9 +50,9 @@ namespace Microsoft.AspNet.Mvc } public List OutputFormatters { get; private set; } - + /// - /// Provides programmatic configuration for the default . + /// Provides programmatic configuration for the default . /// public RazorViewEngineOptions ViewEngineOptions { @@ -75,17 +75,20 @@ namespace Microsoft.AspNet.Mvc } /// - /// Get a list of the used by the . + /// Get a list of the used by the + /// . /// public List ModelBinders { get; private set; } /// - /// Gets a list of descriptors that represent used by this application. + /// Gets a list of descriptors that represent used + /// by this application. /// public List ViewEngines { get; private set; } /// - /// Gets a list of descriptors that represent used by this application. + /// Gets a list of descriptors that represent + /// used by this application. /// public List ValueProviderFactories { get; private set; } diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelBinderDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelBinderDescriptor.cs index 01c156919e..690e3100b6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelBinderDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ModelBinderDescriptor.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of . /// - /// A type that represents a . + /// A type that represents a . public ModelBinderDescriptor([NotNull] Type type) : base(type) { @@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of with the specified instance. /// - /// An instance of . + /// An instance of . public ModelBinderDescriptor([NotNull] IModelBinder binder) : base(binder) { diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptor.cs index be9a01f68a..4a07fc3302 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OptionDescriptor.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of . /// - /// A type that represents . + /// A type that represents . public OptionDescriptor([NotNull] Type type) { var optionType = typeof(TOption); @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of with the specified instance. /// - /// An instance of that the descriptor represents. + /// An instance of that the descriptor represents. public OptionDescriptor([NotNull] TOption option) { Instance = option; @@ -39,7 +39,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors } /// - /// Gets the type of the described by this + /// Gets the type of the described by this /// . /// public Type OptionType @@ -49,7 +49,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors } /// - /// Gets the instance of described by this + /// Gets the instance of described by this /// . /// public TOption Instance diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptor.cs index b5c11cd27d..082e719601 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptor.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of . /// - /// A A type that the descriptor represents. /// public OutputFormatterDescriptor([NotNull] Type type) : base(type) diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs index 68a9b07430..f8b3ec59a7 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ValueProviderFactoryDescriptor.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of . /// - /// The The type that the descriptor represents. public ValueProviderFactoryDescriptor([NotNull] Type type) : base(type) { diff --git a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ViewEngineDescriptor.cs b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ViewEngineDescriptor.cs index 4954606eb6..144a19b664 100644 --- a/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ViewEngineDescriptor.cs +++ b/src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/ViewEngineDescriptor.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors /// /// Creates a new instance of . /// - /// The The type that the descriptor represents. public ViewEngineDescriptor([NotNull] Type type) : base(type) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs index 9a7d63143e..3d63d93ba8 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs @@ -18,7 +18,7 @@ using Microsoft.AspNet.Mvc.Rendering.Expressions; namespace Microsoft.AspNet.Mvc.Rendering { /// - /// Default implementation of non-generic portions of . + /// Default implementation of non-generic portions of . /// public class HtmlHelper : IHtmlHelper, ICanHasViewContext { @@ -125,11 +125,11 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// If the object is already an instance, then it is /// returned as-is. - /// /// /// new { property_name = "value" } will translate to the entry { "property_name" , "value" } /// in the resulting dictionary. /// + /// /// The object to be converted. /// The created dictionary of property names and property values. public static IDictionary ObjectToDictionary(object obj) @@ -628,7 +628,7 @@ namespace Microsoft.AspNet.Mvc.Rendering } /// - /// Writes an opening
tag to the response. When the user submits the form, + /// Renders a <form> start tag to the response. When the user submits the form, /// the request will be processed by an action method. ///
/// The name of the action method. @@ -640,7 +640,9 @@ namespace Microsoft.AspNet.Mvc.Rendering /// The HTTP method for processing the form, either GET or POST. /// An instance containing HTML /// attributes to set for the element. - /// An instance which emits the closing {form} tag when disposed. + /// + /// An instance which emits the </form> end tag when disposed. + /// protected virtual MvcForm GenerateForm(string actionName, string controllerName, object routeValues, FormMethod method, IDictionary htmlAttributes) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs index 8e19e8dc8c..71c1903e2d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperDisplayNameExtensions.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the display name for the current model. /// /// The instance this method extends. - /// A containing the display name. + /// A containing the display name. public static string DisplayNameForModel([NotNull] this IHtmlHelper htmlHelper) { return htmlHelper.DisplayName(string.Empty); @@ -27,12 +27,12 @@ namespace Microsoft.AspNet.Mvc.Rendering /// if the current model represents a collection. /// /// - /// The instance this method extends. + /// The instance this method extends. /// /// The expression to be evaluated against an item in the current model. - /// The of items in the model collection. - /// The of the result. - /// A containing the display name. + /// The type of items in the model collection. + /// The type of the result. + /// A containing the display name. public static string DisplayNameFor( [NotNull] this IHtmlHelper> htmlHelper, [NotNull] Expression> expression) diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs index eb1b714dd3..569597ed98 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperNameExtensions.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the full HTML element name for the current model. /// /// The instance this method extends. - /// A containing the element name. + /// A containing the element name. public static string NameForModel([NotNull] this IHtmlHelper htmlHelper) { return htmlHelper.Name(string.Empty); @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the HTML element Id for the current model. /// /// The instance this method extends. - /// A containing the element Id. + /// A containing the element Id. public static string IdForModel([NotNull] this IHtmlHelper htmlHelper) { return htmlHelper.Id(string.Empty); diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs index 646157b5af..4056d8af81 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/HtmlHelperValueExtensions.cs @@ -16,9 +16,9 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The instance this method extends. /// Expression name, relative to the current model. - /// A containing the formatted value. + /// A containing the formatted value. /// - /// Converts the expression result to a directly. + /// Converts the expression result to a directly. /// public static string Value([NotNull] this IHtmlHelper htmlHelper, string name) { @@ -30,11 +30,11 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The instance this method extends. /// The expression to be evaluated against the current model. - /// The of the model. - /// The of the result. - /// A containing the formatted value. + /// The type of the model. + /// The type of the result. + /// A containing the formatted value. /// - /// Converts the result to a directly. + /// Converts the result to a directly. /// public static string ValueFor( [NotNull] this IHtmlHelper htmlHelper, @@ -47,9 +47,9 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the formatted value for the current model. /// /// The instance this method extends. - /// A containing the formatted value. + /// A containing the formatted value. /// - /// Converts the model value to a directly. + /// Converts the model value to a directly. /// public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper) { @@ -61,12 +61,12 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The instance this method extends. /// - /// The composite format (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). + /// The composite format (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// - /// A containing the formatted value. + /// A containing the formatted value. /// - /// Converts the model value to a directly if - /// is or empty. + /// Converts the model value to a directly if + /// is null or empty. /// public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper, string format) { diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelper.cs index 6b23dfddb3..534be8083a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelper.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelper.cs @@ -13,9 +13,9 @@ namespace Microsoft.AspNet.Mvc.Rendering public interface IHtmlHelper { /// - /// Set this property to to have templated helpers such as - /// and render date and time values as RFC 3339 compliant strings. - /// By default these helpers render dates and times using the current culture. + /// Set this property to to have templated helpers such as + /// and render date and time values as RFC + /// 3339 compliant strings. By default these helpers render dates and times using the current culture. /// Html5DateRenderingMode Html5DateRenderingMode { get; set; } @@ -84,7 +84,7 @@ namespace Microsoft.AspNet.Mvc.Rendering HtmlString AntiForgeryToken(); /// - /// Writes an opening tag to the response. When the user submits the form, + /// Renders a <form> start tag to the response. When the user submits the form, /// the request will be processed by an action method. /// /// The name of the action method. @@ -97,7 +97,9 @@ namespace Microsoft.AspNet.Mvc.Rendering /// An object that contains the HTML attributes to set for the element. /// Alternatively, an instance containing the HTML attributes. /// - /// An instance which emits the closing {form} tag when disposed. + /// + /// An instance which renders the </form> end tag when disposed. + /// MvcForm BeginForm( string actionName, string controllerName, @@ -149,7 +151,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the display name for the specified expression . /// /// Expression name, relative to the current model. - /// A containing the display name. + /// A containing the display name. string DisplayName(string expression); /// @@ -157,23 +159,26 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// Expression name, relative to the current model. /// - /// A containing the simple display text. - /// If the expression result is , returns . + /// A containing the simple display text. + /// If the expression result is null, returns . /// string DisplayText(string name); /// - /// Returns a single-selection HTML {select} element using the specified name of the form field, + /// Returns a single-selection HTML <select> element using the specified name of the form field, /// list items, option label, and HTML attributes. /// /// The name of the form field to return. - /// A collection of objects that are used to populate the + /// A collection of objects that are used to populate the /// drop-down list. /// The text for a default empty item. This parameter can be null. - /// An object that contains the HTML attributes to set for the {select} element. - /// Alternatively, an instance containing the HTML attributes. + /// + /// An object that contains the HTML attributes to set for the <select> element. Alternatively, an + /// instance containing the HTML attributes. /// - /// An HTML {select} element with an {option} subelement for each item in the list. + /// + /// An HTML <select> element with an <option> subelement for each item in the list. + /// HtmlString DropDownList( string name, IEnumerable selectList, @@ -214,7 +219,7 @@ namespace Microsoft.AspNet.Mvc.Rendering string Encode(string value); /// - /// Renders the closing tag to the response. + /// Renders the </form> end tag to the response. /// void EndForm(); @@ -237,9 +242,9 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns information about about client validation rules for the given or /// . Intended for use in extension methods. /// - /// Metadata about the of interest. + /// Metadata about the of interest. /// Expression name, relative to the current model. Used to determine - /// when is ; ignored + /// when is null; ignored /// otherwise. /// An containing the relevant rules. IEnumerable GetClientValidationRules(ModelMetadata metadata, string name); @@ -264,7 +269,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the HTML element Id for the specified expression . /// /// Expression name, relative to the current model. - /// A containing the element Id. + /// A containing the element Id. string Id(string name); /// @@ -280,23 +285,25 @@ namespace Microsoft.AspNet.Mvc.Rendering HtmlString Label(string expression, string labelText, object htmlAttributes); /// - /// Returns a multi-selection HTML {select} element using the specified name of the form field, + /// Returns a multi-selection HTML <select> element using the specified name of the form field, /// list items, and HTML attributes. /// /// The name of the form field to return. - /// A collection of objects that are used to populate the + /// A collection of objects that are used to populate the /// drop-down list. /// An object that contains the HTML attributes to set for the element. /// Alternatively, an instance containing the HTML attributes. /// - /// An HTML {select} element with an {option} subelement for each item in the list. + /// + /// An HTML <select> element with an <option> subelement for each item in the list. + /// HtmlString ListBox(string name, IEnumerable selectList, object htmlAttributes); /// /// Returns the full HTML element name for the specified expression . /// /// Expression name, relative to the current model. - /// A containing the element name. + /// A containing the element name. string Name(string name); /// @@ -476,12 +483,13 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// Expression name, relative to the current model. /// - /// The composite format (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). + /// The composite format + /// (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// - /// A containing the formatted value. + /// A containing the formatted value. /// - /// Converts the expression result to a directly if - /// is or empty. + /// Converts the expression result to a directly if + /// is null or empty. /// string Value([NotNull] string name, string format); } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs index e42def7bb4..70ae46687a 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/IHtmlHelperOfT.cs @@ -57,8 +57,8 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the display name for the specified . /// /// The expression to be evaluated against the current model. - /// The type of the result. - /// A containing the display name. + /// The type of the result. + /// A containing the display name. string DisplayNameFor([NotNull] Expression> expression); /// @@ -67,8 +67,8 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The expression to be evaluated against an item in the current model. /// The type of items in the model collection. - /// The type of the result. - /// A containing the display name. + /// The type of the result. + /// A containing the display name. string DisplayNameForInnerType( [NotNull] Expression> expression); @@ -76,27 +76,30 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the simple display text for the specified . /// /// The expression to be evaluated against the current model. - /// The type of the result. + /// The type of the result. /// - /// A containing the simple display text. - /// If the result is , returns - /// . + /// A containing the simple display text. + /// If the result is null, returns + /// . /// string DisplayTextFor([NotNull] Expression> expression); /// - /// Returns a single-selection HTML {select} element for the object that is represented + /// Returns a single-selection HTML <select> element for the object that is represented /// by the specified expression using the specified list items, option label, and HTML attributes. /// /// The type of the value. /// An expression that identifies the value to display. - /// A collection of objects that are used to populate the + /// A collection of objects that are used to populate the /// drop-down list. /// The text for a default empty item. This parameter can be null. - /// An object that contains the HTML attributes to set for the {select} element. - /// Alternatively, an instance containing the HTML attributes. + /// + /// An object that contains the HTML attributes to set for the <select> element. Alternatively, an + /// instance containing the HTML attributes. /// - /// An HTML {select} element with an {option} subelement for each item in the list. + /// + /// An HTML <select> element with an <option> subelement for each item in the list. + /// HtmlString DropDownListFor( [NotNull] Expression> expression, IEnumerable selectList, @@ -143,8 +146,8 @@ namespace Microsoft.AspNet.Mvc.Rendering /// Returns the HTML element Id for the specified . /// /// The expression to be evaluated against the current model. - /// The type of the result. - /// A containing the element Id. + /// The type of the result. + /// A containing the element Id. string IdFor([NotNull] Expression> expression); /// @@ -162,18 +165,20 @@ namespace Microsoft.AspNet.Mvc.Rendering object htmlAttributes); /// - /// Returns a multi-selection HTML {select} element for the object that is represented by the specified + /// Returns a multi-selection HTML <select> element for the object that is represented by the specified /// expression using the specified list items and HTML attributes. /// /// The type of the property. /// An expression that identifies the object that contains the properties to /// display. - /// A collection of objects that are used to populate the + /// A collection of objects that are used to populate the /// drop-down list. /// An object that contains the HTML attributes to set for the element. /// Alternatively, an instance containing the HTML attributes. /// - /// An HTML {select} element with an {option} subelement for each item in the list. + /// + /// An HTML <select> element with an <option> subelement for each item in the list. + /// HtmlString ListBoxFor( [NotNull] Expression> expression, IEnumerable selectList, @@ -184,7 +189,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The expression to be evaluated against the current model. /// The type of the result. - /// A containing the element name. + /// A containing the element name. string NameFor([NotNull] Expression> expression); /// @@ -251,7 +256,7 @@ namespace Microsoft.AspNet.Mvc.Rendering /// The message to be displayed. This will always be visible but client-side /// validation may update the associated CSS class. /// An object that contains the HTML attributes to set for the element. - /// Alternatively, an /// instance containing the HTML attributes. + /// Alternatively, an instance containing the HTML attributes. /// /// The tag to wrap the in the generated HTML. /// Its default value is . @@ -266,13 +271,13 @@ namespace Microsoft.AspNet.Mvc.Rendering /// /// The expression to be evaluated against the current model. /// - /// The composite format (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). + /// The composite format (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// - /// The type of the result. - /// A containing the formatted value. + /// The type of the result. + /// A containing the formatted value. /// - /// Converts the result to a directly if - /// is or empty. + /// Converts the result to a directly if + /// is null or empty. /// string ValueFor([NotNull] Expression> expression, string format); } diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs index 12651bf5e6..e352ecb4d6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/MvcForm.cs @@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.Rendering } /// - /// Renders the closing tag to the response. + /// Renders the </form> end tag to the response. /// public void EndForm() { diff --git a/src/Microsoft.AspNet.Mvc.Core/ViewDataDictionary.cs b/src/Microsoft.AspNet.Mvc.Core/ViewDataDictionary.cs index 6f6eca58ea..60cd085413 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ViewDataDictionary.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ViewDataDictionary.cs @@ -7,7 +7,6 @@ using System.Collections.Generic; using System.Globalization; using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.ModelBinding; -using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.Rendering.Expressions; namespace Microsoft.AspNet.Mvc @@ -43,7 +42,7 @@ namespace Microsoft.AspNet.Mvc /// /// copy constructor for use when model type may change. This avoids - /// exceptions a derived class may throw when is called. + /// exceptions a derived class may throw when is called. /// public ViewDataDictionary([NotNull] ViewDataDictionary source, object model) : this(source.MetadataProvider) diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs index be640b4162..851f9c3de8 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Binders/GenericModelBinder.cs @@ -79,10 +79,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding } /// - /// Example: GetGenericBinder(typeof(IList<>), typeof(List<>), typeof(ListBinder<>), ...) means that the - /// ListBinder type can update models that implement IList, and if for some reason the existing model - /// instance is not updatable the binder will create a List object and bind to that instead. This method - /// will return ListBinder or null, depending on whether the type and updatability checks succeed. + /// Example: GetGenericBinderType(typeof(IList<T>), typeof(List<T>), + /// typeof(ListBinder<T>), ...) means that the ListBinder<T> type can update models that + /// implement , and if for some reason the existing model instance is not updatable the + /// binder will create a object and bind to that instead. This method will return + /// ListBinder<T> or null, depending on whether the type and updatability checks succeed. /// private static Type GetGenericBinderType(Type supportedInterfaceType, Type newInstanceType, diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs index 2b44574291..921ea3c5f9 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Metadata/ModelMetadata.cs @@ -140,7 +140,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding protected IModelMetadataProvider Provider { get; set; } /// - /// Gets TModel if ModelType is Nullable{TModel}, ModelType otherwise. + /// Gets T if is ; + /// otherwise. /// public Type RealModelType { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidatorProvider.cs index d0ad00e8f1..6bea81e5a5 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataAnnotationsModelValidatorProvider.cs @@ -9,12 +9,12 @@ using System.Linq; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// An implementation of which providers validators + /// An implementation of which providers validators /// for attributes which derive from . It also provides /// a validator for types which implement . To support /// client side validation, you can either register adapters through the static methods /// on this class, or by having your validation attributes implement - /// . The logic to support IClientValidatable + /// . The logic to support /// is implemented in . /// public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataMemberModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataMemberModelValidatorProvider.cs index 059816c1c3..9d7b738ec1 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataMemberModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/DataMemberModelValidatorProvider.cs @@ -10,8 +10,8 @@ using System.Runtime.Serialization; namespace Microsoft.AspNet.Mvc.ModelBinding { /// - /// This provides a required ModelValidator for members marked - /// as [DataMember(IsRequired=true)]. + /// This provides a required ModelValidator for members marked + /// as [DataMember(IsRequired=true)]. /// public class DataMemberModelValidatorProvider : AssociatedValidatorProvider { diff --git a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs index 0299832175..bc766bbee8 100644 --- a/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs +++ b/src/Microsoft.AspNet.Mvc.ModelBinding/Validation/ModelClientValidationRule.cs @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding /// /// Identifier of the . If client-side validation is enabled, default - /// validation attribute generator uses this as part of the generated "data-val" + /// validation attribute generator uses this as part of the generated "data-val" /// attribute name. Must be unique in the set of enabled validation rules. /// public string ValidationType { get; private set; } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperDisplayTextTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperDisplayTextTest.cs index 7df2f7e1c2..232a6a0dec 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperDisplayTextTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperDisplayTextTest.cs @@ -8,7 +8,8 @@ using Xunit; namespace Microsoft.AspNet.Mvc.Core { /// - /// Test the and methods. + /// Test the and + /// methods. /// public class HtmlHelperDisplayTextTest { diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs index 41e549e5f1..86f8f27386 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/TestController.cs @@ -67,9 +67,9 @@ namespace Microsoft.AspNet.Mvc.Core.Test } /// - /// Returns a Task instead of a Task. This should throw an InvalidOperationException. + /// Returns a instead of a . This should throw an + /// . /// - /// public Task UnwrappedTask(int i, string s) { return Task.Factory.StartNew(async () => await Task.Delay(50));