Correct XML comment syntax

- fix problems at least with Roslyn compiler and VS IntelliSense or the Object Browser
 - `<see langref="keyword"/>` generates nothing
 - `<example>` at top level (outside `<summary>`) generates nothing
 - curly braces don't become angle brackets outside `<see cref="reference"/>` references
  - yeah, a point @yishaigalatzer asked about in a previous PR
- `<see href="reference"/>` 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 `<!-- Badly formed XML comment ... -->`, usually indicating an unclosed element
- generated XML attributes such as `cref="!:..."`, indicating a broken reference
 - in a couple of cases we had `<typeparamref cref="TOption"/>`; attribute should be `"name"`

Few wording changes beyond
- `"opening </form> tag"` -> `"<form> start tag"`
- `"closing </form> tag"` -> `"</form> 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 '!'`
This commit is contained in:
dougbu 2014-08-03 00:52:32 -07:00
parent eaee27756c
commit 8ab11bc073
25 changed files with 136 additions and 119 deletions

View File

@ -10,7 +10,7 @@ using Microsoft.Framework.Runtime;
namespace Microsoft.AspNet.Mvc.Core namespace Microsoft.AspNet.Mvc.Core
{ {
/// <summary> /// <summary>
/// A default implementation for the <see cref="IFileInfoCache" interface./> /// A default implementation for the <see cref="IFileInfoCache"/> interface.
/// </summary> /// </summary>
public class ExpiringFileInfoCache : IFileInfoCache public class ExpiringFileInfoCache : IFileInfoCache
{ {

View File

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNet.Mvc.Rendering;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
{ {
@ -14,8 +13,8 @@ namespace Microsoft.AspNet.Mvc
private Dictionary<string, object> _formData; private Dictionary<string, object> _formData;
/// <summary> /// <summary>
/// Property bag for any information you wish to associate with a {form/} in an <see cref="IHtmlHelper"/> /// Property bag for any information you wish to associate with a &lt;form/&gt; in an
/// implementation or extension method. /// <see cref="Rendering.IHtmlHelper"/> implementation or extension method.
/// </summary> /// </summary>
public IDictionary<string, object> FormData public IDictionary<string, object> FormData
{ {

View File

@ -25,17 +25,15 @@ namespace Microsoft.AspNet.Mvc
get { return _mediaTypeComparer; } get { return _mediaTypeComparer; }
} }
/// <summary> /// <inheritdoc />
/// Compares two <see cref="MediaTypeWithQualityHeaderValue"/> based on their quality value /// <remarks>
/// (a.k.a their "q-value"). Values with identical q-values are considered equal (i.e the result is 0) /// Performs comparisons based on the arguments' quality values
/// with the exception that sub-type wild-cards are considered less than specific media types and full /// (aka their "q-value"). Values with identical q-values are considered equal (i.e. the result is 0)
/// wild-cards are considered less than sub-type wild-cards. This allows to sort a sequence of /// 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
/// <see cref="MediaTypeWithQualityHeaderValue"/> following their q-values in the order of specific /// <see cref="MediaTypeWithQualityHeaderValue"/> following their q-values in the order of specific
/// media types, sub-type wildcards, and last any full wild-cards. /// media types, subtype wildcards, and last any full wildcards.
/// </summary> /// </remarks>
/// <param name="mediaType1">The first <see cref="MediaTypeWithQualityHeaderValue"/> to compare.</param>
/// <param name="mediaType2">The second <see cref="MediaTypeWithQualityHeaderValue"/> to compare.</param>
/// <returns></returns>
public int Compare(MediaTypeWithQualityHeaderValue mediaType1, MediaTypeWithQualityHeaderValue mediaType2) public int Compare(MediaTypeWithQualityHeaderValue mediaType1, MediaTypeWithQualityHeaderValue mediaType2)
{ {
if (object.ReferenceEquals(mediaType1, mediaType2)) if (object.ReferenceEquals(mediaType1, mediaType2))

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.Core
/// Returns a cached <see cref="IFileInfo" /> for a given path. /// Returns a cached <see cref="IFileInfo" /> for a given path.
/// </summary> /// </summary>
/// <param name="virtualPath">The virtual path.</param> /// <param name="virtualPath">The virtual path.</param>
/// <returns></returns> /// <returns>The cached <see cref="IFileInfo"/>.</returns>
IFileInfo GetFileInfo(string virtualPath); IFileInfo GetFileInfo(string virtualPath);
} }
} }

View File

@ -52,7 +52,7 @@ namespace Microsoft.AspNet.Mvc
public List<OutputFormatterDescriptor> OutputFormatters { get; private set; } public List<OutputFormatterDescriptor> OutputFormatters { get; private set; }
/// <summary> /// <summary>
/// Provides programmatic configuration for the default <see cref="IViewEngine" />. /// Provides programmatic configuration for the default <see cref="Rendering.IViewEngine" />.
/// </summary> /// </summary>
public RazorViewEngineOptions ViewEngineOptions public RazorViewEngineOptions ViewEngineOptions
{ {
@ -75,17 +75,20 @@ namespace Microsoft.AspNet.Mvc
} }
/// <summary> /// <summary>
/// Get a list of the <see cref="ModelBinderDescriptor" /> used by the <see cref="CompositeModelBinder" />. /// Get a list of the <see cref="ModelBinderDescriptor" /> used by the
/// <see cref="ModelBinding.CompositeModelBinder" />.
/// </summary> /// </summary>
public List<ModelBinderDescriptor> ModelBinders { get; private set; } public List<ModelBinderDescriptor> ModelBinders { get; private set; }
/// <summary> /// <summary>
/// Gets a list of descriptors that represent <see cref="IViewEngine"/> used by this application. /// Gets a list of descriptors that represent <see cref="Rendering.IViewEngine"/> used
/// by this application.
/// </summary> /// </summary>
public List<ViewEngineDescriptor> ViewEngines { get; private set; } public List<ViewEngineDescriptor> ViewEngines { get; private set; }
/// <summary> /// <summary>
/// Gets a list of descriptors that represent <see cref="IValueProviderFactory"/> used by this application. /// Gets a list of descriptors that represent
/// <see cref="ModelBinding.IValueProviderFactory"/> used by this application.
/// </summary> /// </summary>
public List<ValueProviderFactoryDescriptor> ValueProviderFactories { get; private set; } public List<ValueProviderFactoryDescriptor> ValueProviderFactories { get; private set; }

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="ModelBinderDescriptor"/>. /// Creates a new instance of <see cref="ModelBinderDescriptor"/>.
/// </summary> /// </summary>
/// <param name="type">A type that represents a <see cref="IModelBinder"/>. /// <param name="type">A type that represents a <see cref="IModelBinder"/>.</param>
public ModelBinderDescriptor([NotNull] Type type) public ModelBinderDescriptor([NotNull] Type type)
: base(type) : base(type)
{ {
@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="ModelBinderDescriptor"/> with the specified instance. /// Creates a new instance of <see cref="ModelBinderDescriptor"/> with the specified instance.
/// </summary> /// </summary>
/// <param name="option">An instance of <see cref="IModelBinder"/>. /// <param name="option">An instance of <see cref="IModelBinder"/>.</param>
public ModelBinderDescriptor([NotNull] IModelBinder binder) public ModelBinderDescriptor([NotNull] IModelBinder binder)
: base(binder) : base(binder)
{ {

View File

@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="OptionDescriptor{TOption}"/>. /// Creates a new instance of <see cref="OptionDescriptor{TOption}"/>.
/// </summary> /// </summary>
/// <param name="type">A type that represents <typeparamref name="TOption"/>. /// <param name="type">A type that represents <typeparamref name="TOption"/>.</param>
public OptionDescriptor([NotNull] Type type) public OptionDescriptor([NotNull] Type type)
{ {
var optionType = typeof(TOption); var optionType = typeof(TOption);
@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="OptionDescriptor{TOption}"/> with the specified instance. /// Creates a new instance of <see cref="OptionDescriptor{TOption}"/> with the specified instance.
/// </summary> /// </summary>
/// <param name="option">An instance of <typeparamref cref="TOption"/> that the descriptor represents.</param> /// <param name="option">An instance of <typeparamref name="TOption"/> that the descriptor represents.</param>
public OptionDescriptor([NotNull] TOption option) public OptionDescriptor([NotNull] TOption option)
{ {
Instance = option; Instance = option;
@ -39,7 +39,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
} }
/// <summary> /// <summary>
/// Gets the type of the <typeparamref cref="TOption"/> described by this /// Gets the type of the <typeparamref name="TOption"/> described by this
/// <see cref="OptionDescriptor{TOption}"/>. /// <see cref="OptionDescriptor{TOption}"/>.
/// </summary> /// </summary>
public Type OptionType public Type OptionType
@ -49,7 +49,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
} }
/// <summary> /// <summary>
/// Gets the instance of <typeparamref cref="TOption"/> described by this /// Gets the instance of <typeparamref name="TOption"/> described by this
/// <see cref="OptionDescriptor{TOption}"/>. /// <see cref="OptionDescriptor{TOption}"/>.
/// </summary> /// </summary>
public TOption Instance public TOption Instance

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="OutputFormatterDescriptor"/>. /// Creates a new instance of <see cref="OutputFormatterDescriptor"/>.
/// </summary> /// </summary>
/// <param name="type">A <see cref="IOutputFormatter/> type that the descriptor represents. /// <param name="type">A <see cref="IOutputFormatter"/> type that the descriptor represents.
/// </param> /// </param>
public OutputFormatterDescriptor([NotNull] Type type) public OutputFormatterDescriptor([NotNull] Type type)
: base(type) : base(type)

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="ValueProviderFactoryDescriptor"/>. /// Creates a new instance of <see cref="ValueProviderFactoryDescriptor"/>.
/// </summary> /// </summary>
/// <param name="type">The <see cref="IValueProviderFactory/> type that the descriptor represents.</param> /// <param name="type">The <see cref="IValueProviderFactory"/> type that the descriptor represents.</param>
public ValueProviderFactoryDescriptor([NotNull] Type type) public ValueProviderFactoryDescriptor([NotNull] Type type)
: base(type) : base(type)
{ {

View File

@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.OptionDescriptors
/// <summary> /// <summary>
/// Creates a new instance of <see cref="ViewEngineDescriptor"/>. /// Creates a new instance of <see cref="ViewEngineDescriptor"/>.
/// </summary> /// </summary>
/// <param name="type">The <see cref="IViewEngine/> type that the descriptor represents.</param> /// <param name="type">The <see cref="IViewEngine"/> type that the descriptor represents.</param>
public ViewEngineDescriptor([NotNull] Type type) public ViewEngineDescriptor([NotNull] Type type)
: base(type) : base(type)
{ {

View File

@ -18,7 +18,7 @@ using Microsoft.AspNet.Mvc.Rendering.Expressions;
namespace Microsoft.AspNet.Mvc.Rendering namespace Microsoft.AspNet.Mvc.Rendering
{ {
/// <summary> /// <summary>
/// Default implementation of non-generic portions of <see cref="IHtmlHelper{T}">. /// Default implementation of non-generic portions of <see cref="IHtmlHelper{TModel}"/>.
/// </summary> /// </summary>
public class HtmlHelper : IHtmlHelper, ICanHasViewContext public class HtmlHelper : IHtmlHelper, ICanHasViewContext
{ {
@ -125,11 +125,11 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// ///
/// If the object is already an <see cref="IDictionary{string, object}"/> instance, then it is /// If the object is already an <see cref="IDictionary{string, object}"/> instance, then it is
/// returned as-is. /// returned as-is.
/// </summary>
/// <example> /// <example>
/// <c>new { property_name = "value" }</c> will translate to the entry <c>{ "property_name" , "value" }</c> /// <c>new { property_name = "value" }</c> will translate to the entry <c>{ "property_name" , "value" }</c>
/// in the resulting dictionary. /// in the resulting dictionary.
/// </example> /// </example>
/// </summary>
/// <param name="obj">The object to be converted.</param> /// <param name="obj">The object to be converted.</param>
/// <returns>The created dictionary of property names and property values.</returns> /// <returns>The created dictionary of property names and property values.</returns>
public static IDictionary<string, object> ObjectToDictionary(object obj) public static IDictionary<string, object> ObjectToDictionary(object obj)
@ -628,7 +628,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
} }
/// <summary> /// <summary>
/// Writes an opening <form> tag to the response. When the user submits the form, /// Renders a &lt;form&gt; start tag to the response. When the user submits the form,
/// the request will be processed by an action method. /// the request will be processed by an action method.
/// </summary> /// </summary>
/// <param name="actionName">The name of the action method.</param> /// <param name="actionName">The name of the action method.</param>
@ -640,7 +640,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// <param name="method">The HTTP method for processing the form, either GET or POST.</param> /// <param name="method">The HTTP method for processing the form, either GET or POST.</param>
/// <param name="htmlAttributes">An <see cref="IDictionary{string, object}"/> instance containing HTML /// <param name="htmlAttributes">An <see cref="IDictionary{string, object}"/> instance containing HTML
/// attributes to set for the element.</param> /// attributes to set for the element.</param>
/// <returns>An <see cref="MvcForm"/> instance which emits the closing {form} tag when disposed.</returns> /// <returns>
/// An <see cref="MvcForm"/> instance which emits the &lt;/form&gt; end tag when disposed.
/// </returns>
protected virtual MvcForm GenerateForm(string actionName, string controllerName, object routeValues, protected virtual MvcForm GenerateForm(string actionName, string controllerName, object routeValues,
FormMethod method, IDictionary<string, object> htmlAttributes) FormMethod method, IDictionary<string, object> htmlAttributes)
{ {

View File

@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the display name for the current model. /// Returns the display name for the current model.
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <returns>A <see langref="string"/> containing the display name.</returns> /// <returns>A <see cref="String"/> containing the display name.</returns>
public static string DisplayNameForModel([NotNull] this IHtmlHelper htmlHelper) public static string DisplayNameForModel([NotNull] this IHtmlHelper htmlHelper)
{ {
return htmlHelper.DisplayName(string.Empty); return htmlHelper.DisplayName(string.Empty);
@ -27,12 +27,12 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// if the current model represents a collection. /// if the current model represents a collection.
/// </summary> /// </summary>
/// <param name="htmlHelper"> /// <param name="htmlHelper">
/// The <see cref="IHtmlHelper{IEnumerable<TModelItem>}"/> instance this method extends. /// The <see cref="IHtmlHelper{IEnumerable{TModelItem}}"/> instance this method extends.
/// </param> /// </param>
/// <param name="expression">The expression to be evaluated against an item in the current model.</param> /// <param name="expression">The expression to be evaluated against an item in the current model.</param>
/// <typeparam name="TModelItem">The <see cref="Type"/> of items in the model collection.</typeparam> /// <typeparam name="TModelItem">The type of items in the model collection.</typeparam>
/// <typeparam name="TValue">The <see cref="Type"/> of the <param name="expression"> result.</typeparam> /// <typeparam name="TValue">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the display name.</returns> /// <returns>A <see cref="String"/> containing the display name.</returns>
public static string DisplayNameFor<TModelItem, TValue>( public static string DisplayNameFor<TModelItem, TValue>(
[NotNull] this IHtmlHelper<IEnumerable<TModelItem>> htmlHelper, [NotNull] this IHtmlHelper<IEnumerable<TModelItem>> htmlHelper,
[NotNull] Expression<Func<TModelItem, TValue>> expression) [NotNull] Expression<Func<TModelItem, TValue>> expression)

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the full HTML element name for the current model. /// Returns the full HTML element name for the current model.
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <returns>A <see langref="string"/> containing the element name.</returns> /// <returns>A <see cref="System.String"/> containing the element name.</returns>
public static string NameForModel([NotNull] this IHtmlHelper htmlHelper) public static string NameForModel([NotNull] this IHtmlHelper htmlHelper)
{ {
return htmlHelper.Name(string.Empty); return htmlHelper.Name(string.Empty);
@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the HTML element Id for the current model. /// Returns the HTML element Id for the current model.
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <returns>A <see langref="string"/> containing the element Id.</returns> /// <returns>A <see cref="System.String"/> containing the element Id.</returns>
public static string IdForModel([NotNull] this IHtmlHelper htmlHelper) public static string IdForModel([NotNull] this IHtmlHelper htmlHelper)
{ {
return htmlHelper.Id(string.Empty); return htmlHelper.Id(string.Empty);

View File

@ -16,9 +16,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <param name="name">Expression name, relative to the current model.</param> /// <param name="name">Expression name, relative to the current model.</param>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the expression <paramref name="name"/> result to a <see langref="string"/> directly. /// Converts the expression <paramref name="name"/> result to a <see cref="String"/> directly.
/// </remarks> /// </remarks>
public static string Value([NotNull] this IHtmlHelper htmlHelper, string name) public static string Value([NotNull] this IHtmlHelper htmlHelper, string name)
{ {
@ -30,11 +30,11 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper{TModel}"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper{TModel}"/> instance this method extends.</param>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <typeparam name="TModel">The <see cref="Type"/> of the model.</typeparam> /// <typeparam name="TModel">The type of the model.</typeparam>
/// <typeparam name="TProperty">The <see cref="Type"/> of the <param name="expression"> result.</typeparam> /// <typeparam name="TProperty">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the <paramref name="expression"/> result to a <see langref="string"/> directly. /// Converts the <paramref name="expression"/> result to a <see cref="String"/> directly.
/// </remarks> /// </remarks>
public static string ValueFor<TModel, TProperty>( public static string ValueFor<TModel, TProperty>(
[NotNull] this IHtmlHelper<TModel> htmlHelper, [NotNull] this IHtmlHelper<TModel> htmlHelper,
@ -47,9 +47,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the formatted value for the current model. /// Returns the formatted value for the current model.
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the model value to a <see langref="string"/> directly. /// Converts the model value to a <see cref="String"/> directly.
/// </remarks> /// </remarks>
public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper) public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper)
{ {
@ -61,12 +61,12 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param> /// <param name="htmlHelper">The <see cref="IHtmlHelper"/> instance this method extends.</param>
/// <param name="format"> /// <param name="format">
/// The composite format <see langref="string"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// The composite format <see cref="String"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
/// </param> /// </param>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the model value to a <see langref="string"/> directly if /// Converts the model value to a <see cref="String"/> directly if
/// <paramref name="format"/> is <see langref="null"/> or empty. /// <paramref name="format"/> is <c>null</c> or empty.
/// </remarks> /// </remarks>
public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper, string format) public static string ValueForModel([NotNull] this IHtmlHelper htmlHelper, string format)
{ {

View File

@ -13,9 +13,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
public interface IHtmlHelper public interface IHtmlHelper
{ {
/// <summary> /// <summary>
/// Set this property to <see cref="Mvc.Html5DateRenderingMode.Rfc3339"/> to have templated helpers such as /// Set this property to <see cref="Html5DateRenderingMode.Rfc3339"/> to have templated helpers such as
/// <see cref="Editor"/> and <see cref="EditorFor"/> render date and time values as RFC 3339 compliant strings. /// <see cref="Editor"/> and <see cref="IHtmlHelper{TModel}.EditorFor"/> render date and time values as RFC
/// By default these helpers render dates and times using the current culture. /// 3339 compliant strings. By default these helpers render dates and times using the current culture.
/// </summary> /// </summary>
Html5DateRenderingMode Html5DateRenderingMode { get; set; } Html5DateRenderingMode Html5DateRenderingMode { get; set; }
@ -84,7 +84,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
HtmlString AntiForgeryToken(); HtmlString AntiForgeryToken();
/// <summary> /// <summary>
/// Writes an opening <form> tag to the response. When the user submits the form, /// Renders a &lt;form&gt; start tag to the response. When the user submits the form,
/// the request will be processed by an action method. /// the request will be processed by an action method.
/// </summary> /// </summary>
/// <param name="actionName">The name of the action method.</param> /// <param name="actionName">The name of the action method.</param>
@ -97,7 +97,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element. /// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element.
/// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <returns>An <see cref="MvcForm"/> instance which emits the closing {form} tag when disposed.</returns> /// <returns>
/// An <see cref="MvcForm"/> instance which renders the &lt;/form&gt; end tag when disposed.
/// </returns>
MvcForm BeginForm( MvcForm BeginForm(
string actionName, string actionName,
string controllerName, string controllerName,
@ -149,7 +151,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the display name for the specified expression <paramref name="expression"/>. /// Returns the display name for the specified expression <paramref name="expression"/>.
/// </summary> /// </summary>
/// <param name="expression">Expression name, relative to the current model.</param> /// <param name="expression">Expression name, relative to the current model.</param>
/// <returns>A <see langref="string"/> containing the display name.</returns> /// <returns>A <see cref="System.String"/> containing the display name.</returns>
string DisplayName(string expression); string DisplayName(string expression);
/// <summary> /// <summary>
@ -157,23 +159,26 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="name">Expression name, relative to the current model.</param> /// <param name="name">Expression name, relative to the current model.</param>
/// <returns> /// <returns>
/// A <see langref="string"/> containing the simple display text. /// A <see cref="System.String"/> containing the simple display text.
/// If the expression result is <see langref="null"/>, returns <see cref="ModelMetadata.NullDisplayText"/>. /// If the expression result is <c>null</c>, returns <see cref="ModelMetadata.NullDisplayText"/>.
/// </returns> /// </returns>
string DisplayText(string name); string DisplayText(string name);
/// <summary> /// <summary>
/// Returns a single-selection HTML {select} element using the specified name of the form field, /// Returns a single-selection HTML &lt;select&gt; element using the specified name of the form field,
/// list items, option label, and HTML attributes. /// list items, option label, and HTML attributes.
/// </summary> /// </summary>
/// <param name="name">The name of the form field to return.</param> /// <param name="name">The name of the form field to return.</param>
/// <param name="selectList">A collection of <see href="SelectListItem"/> objects that are used to populate the /// <param name="selectList">A collection of <see cref="SelectListItem"/> objects that are used to populate the
/// drop-down list.</param> /// drop-down list.</param>
/// <param name="optionLabel">The text for a default empty item. This parameter can be null.</param> /// <param name="optionLabel">The text for a default empty item. This parameter can be null.</param>
/// <param name="htmlAttributes">An object that contains the HTML attributes to set for the {select} element. /// <param name="htmlAttributes">
/// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// An object that contains the HTML attributes to set for the &lt;select&gt; element. Alternatively, an
/// <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <returns>An HTML {select} element with an {option} subelement for each item in the list.</returns> /// <returns>
/// An HTML &lt;select&gt; element with an &lt;option&gt; subelement for each item in the list.
/// </returns>
HtmlString DropDownList( HtmlString DropDownList(
string name, string name,
IEnumerable<SelectListItem> selectList, IEnumerable<SelectListItem> selectList,
@ -214,7 +219,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
string Encode(string value); string Encode(string value);
/// <summary> /// <summary>
/// Renders the closing </form> tag to the response. /// Renders the &lt;/form&gt; end tag to the response.
/// </summary> /// </summary>
void EndForm(); void EndForm();
@ -237,9 +242,9 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns information about about client validation rules for the given <paramref name="metadata"/> or /// Returns information about about client validation rules for the given <paramref name="metadata"/> or
/// <paramref name="name"/>. Intended for use in <see cref="IHtmlHelper"/> extension methods. /// <paramref name="name"/>. Intended for use in <see cref="IHtmlHelper"/> extension methods.
/// </summary> /// </summary>
/// <param name="metadata">Metadata about the <see langref="object"/> of interest.</param> /// <param name="metadata">Metadata about the <see cref="System.Object"/> of interest.</param>
/// <param name="name">Expression name, relative to the current model. Used to determine /// <param name="name">Expression name, relative to the current model. Used to determine
/// <see cref="ModelMetadata"/> when <paramref name="metadata"/> is <see langref="null"/>; ignored /// <see cref="ModelMetadata"/> when <paramref name="metadata"/> is <c>null</c>; ignored
/// otherwise.</param> /// otherwise.</param>
/// <returns>An <see cref="IEnumerable{ModelClientValidationRule}"/> containing the relevant rules.</returns> /// <returns>An <see cref="IEnumerable{ModelClientValidationRule}"/> containing the relevant rules.</returns>
IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, string name); IEnumerable<ModelClientValidationRule> GetClientValidationRules(ModelMetadata metadata, string name);
@ -264,7 +269,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the HTML element Id for the specified expression <paramref name="name"/>. /// Returns the HTML element Id for the specified expression <paramref name="name"/>.
/// </summary> /// </summary>
/// <param name="name">Expression name, relative to the current model.</param> /// <param name="name">Expression name, relative to the current model.</param>
/// <returns>A <see langref="string"/> containing the element Id.</returns> /// <returns>A <see cref="System.String"/> containing the element Id.</returns>
string Id(string name); string Id(string name);
/// <summary> /// <summary>
@ -280,23 +285,25 @@ namespace Microsoft.AspNet.Mvc.Rendering
HtmlString Label(string expression, string labelText, object htmlAttributes); HtmlString Label(string expression, string labelText, object htmlAttributes);
/// <summary> /// <summary>
/// Returns a multi-selection HTML {select} element using the specified name of the form field, /// Returns a multi-selection HTML &lt;select&gt; element using the specified name of the form field,
/// list items, and HTML attributes. /// list items, and HTML attributes.
/// </summary> /// </summary>
/// <param name="name">The name of the form field to return.</param> /// <param name="name">The name of the form field to return.</param>
/// <param name="selectList">A collection of <see href="SelectListItem"/> objects that are used to populate the /// <param name="selectList">A collection of <see cref="SelectListItem"/> objects that are used to populate the
/// drop-down list.</param> /// drop-down list.</param>
/// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element. /// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element.
/// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <returns>An HTML {select} element with an {option} subelement for each item in the list.</returns> /// <returns>
/// An HTML &lt;select&gt; element with an &lt;option&gt; subelement for each item in the list.
/// </returns>
HtmlString ListBox(string name, IEnumerable<SelectListItem> selectList, object htmlAttributes); HtmlString ListBox(string name, IEnumerable<SelectListItem> selectList, object htmlAttributes);
/// <summary> /// <summary>
/// Returns the full HTML element name for the specified expression <paramref name="name"/>. /// Returns the full HTML element name for the specified expression <paramref name="name"/>.
/// </summary> /// </summary>
/// <param name="name">Expression name, relative to the current model.</param> /// <param name="name">Expression name, relative to the current model.</param>
/// <returns>A <see langref="string"/> containing the element name.</returns> /// <returns>A <see cref="System.String"/> containing the element name.</returns>
string Name(string name); string Name(string name);
/// <summary> /// <summary>
@ -476,12 +483,13 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="name">Expression name, relative to the current model.</param> /// <param name="name">Expression name, relative to the current model.</param>
/// <param name="format"> /// <param name="format">
/// The composite format <see langref="string"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// The composite format <see cref="System.String"/>
/// (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
/// </param> /// </param>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="System.String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the expression result to a <see langref="string"/> directly if /// Converts the expression result to a <see cref="System.String"/> directly if
/// <paramref name="format"/> is <see langref="null"/> or empty. /// <paramref name="format"/> is <c>null</c> or empty.
/// </remarks> /// </remarks>
string Value([NotNull] string name, string format); string Value([NotNull] string name, string format);
} }

View File

@ -57,8 +57,8 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the display name for the specified <paramref name="expression"/>. /// Returns the display name for the specified <paramref name="expression"/>.
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <typeparam name="TValue">The type of the <param name="expression"> result.</typeparam> /// <typeparam name="TValue">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the display name.</returns> /// <returns>A <see cref="String"/> containing the display name.</returns>
string DisplayNameFor<TValue>([NotNull] Expression<Func<TModel, TValue>> expression); string DisplayNameFor<TValue>([NotNull] Expression<Func<TModel, TValue>> expression);
/// <summary> /// <summary>
@ -67,8 +67,8 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against an item in the current model.</param> /// <param name="expression">The expression to be evaluated against an item in the current model.</param>
/// <typeparam name="TModelItem">The type of items in the model collection.</typeparam> /// <typeparam name="TModelItem">The type of items in the model collection.</typeparam>
/// <typeparam name="TValue">The type of the <param name="expression"> result.</typeparam> /// <typeparam name="TValue">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the display name.</returns> /// <returns>A <see cref="String"/> containing the display name.</returns>
string DisplayNameForInnerType<TModelItem, TValue>( string DisplayNameForInnerType<TModelItem, TValue>(
[NotNull] Expression<Func<TModelItem, TValue>> expression); [NotNull] Expression<Func<TModelItem, TValue>> expression);
@ -76,27 +76,30 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the simple display text for the specified <paramref name="expression"/>. /// Returns the simple display text for the specified <paramref name="expression"/>.
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <typeparam name="TValue">The type of the <param name="expression"> result.</typeparam> /// <typeparam name="TValue">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns> /// <returns>
/// A <see langref="string"/> containing the simple display text. /// A <see cref="String"/> containing the simple display text.
/// If the <param name="expression"> result is <see langref="null"/>, returns /// If the <paramref name="expression"/> result is <c>null</c>, returns
/// <see cref="ModelMetadata.NullDisplayText"/>. /// <see cref="ModelBinding.ModelMetadata.NullDisplayText"/>.
/// </returns> /// </returns>
string DisplayTextFor<TValue>([NotNull] Expression<Func<TModel, TValue>> expression); string DisplayTextFor<TValue>([NotNull] Expression<Func<TModel, TValue>> expression);
/// <summary> /// <summary>
/// Returns a single-selection HTML {select} element for the object that is represented /// Returns a single-selection HTML &lt;select&gt; element for the object that is represented
/// by the specified expression using the specified list items, option label, and HTML attributes. /// by the specified expression using the specified list items, option label, and HTML attributes.
/// </summary> /// </summary>
/// <typeparam name="TProperty">The type of the value.</typeparam> /// <typeparam name="TProperty">The type of the value.</typeparam>
/// <param name="expression">An expression that identifies the value to display.</param> /// <param name="expression">An expression that identifies the value to display.</param>
/// <param name="selectList">A collection of <see href="SelectListItem"/> objects that are used to populate the /// <param name="selectList">A collection of <see cref="SelectListItem"/> objects that are used to populate the
/// drop-down list.</param> /// drop-down list.</param>
/// <param name="optionLabel">The text for a default empty item. This parameter can be null.</param> /// <param name="optionLabel">The text for a default empty item. This parameter can be null.</param>
/// <param name="htmlAttributes">An object that contains the HTML attributes to set for the {select} element. /// <param name="htmlAttributes">
/// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// An object that contains the HTML attributes to set for the &lt;select&gt; element. Alternatively, an
/// <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <returns>An HTML {select} element with an {option} subelement for each item in the list.</returns> /// <returns>
/// An HTML &lt;select&gt; element with an &lt;option&gt; subelement for each item in the list.
/// </returns>
HtmlString DropDownListFor<TProperty>( HtmlString DropDownListFor<TProperty>(
[NotNull] Expression<Func<TModel, TProperty>> expression, [NotNull] Expression<Func<TModel, TProperty>> expression,
IEnumerable<SelectListItem> selectList, IEnumerable<SelectListItem> selectList,
@ -143,8 +146,8 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// Returns the HTML element Id for the specified <paramref name="expression"/>. /// Returns the HTML element Id for the specified <paramref name="expression"/>.
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <typeparam name="TProperty">The type of the <param name="expression"> result.</typeparam> /// <typeparam name="TProperty">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the element Id.</returns> /// <returns>A <see cref="String"/> containing the element Id.</returns>
string IdFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression); string IdFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression);
/// <summary> /// <summary>
@ -162,18 +165,20 @@ namespace Microsoft.AspNet.Mvc.Rendering
object htmlAttributes); object htmlAttributes);
/// <summary> /// <summary>
/// Returns a multi-selection HTML {select} element for the object that is represented by the specified /// Returns a multi-selection HTML &lt;select&gt; element for the object that is represented by the specified
/// expression using the specified list items and HTML attributes. /// expression using the specified list items and HTML attributes.
/// </summary> /// </summary>
/// <typeparam name="TProperty">The type of the property.</typeparam> /// <typeparam name="TProperty">The type of the property.</typeparam>
/// <param name="expression">An expression that identifies the object that contains the properties to /// <param name="expression">An expression that identifies the object that contains the properties to
/// display.</param> /// display.</param>
/// <param name="selectList">A collection of <see href="SelectListItem"/> objects that are used to populate the /// <param name="selectList">A collection of <see cref="SelectListItem"/> objects that are used to populate the
/// drop-down list.</param> /// drop-down list.</param>
/// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element. /// <param name="htmlAttributes">An object that contains the HTML attributes to set for the element.
/// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <returns>An HTML {select} element with an {option} subelement for each item in the list.</returns> /// <returns>
/// An HTML &lt;select&gt; element with an &lt;option&gt; subelement for each item in the list.
/// </returns>
HtmlString ListBoxFor<TProperty>( HtmlString ListBoxFor<TProperty>(
[NotNull] Expression<Func<TModel, TProperty>> expression, [NotNull] Expression<Func<TModel, TProperty>> expression,
IEnumerable<SelectListItem> selectList, IEnumerable<SelectListItem> selectList,
@ -184,7 +189,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <typeparam name="TProperty">The type of the <paramref name="expression"/> result.</typeparam> /// <typeparam name="TProperty">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the element name.</returns> /// <returns>A <see cref="String"/> containing the element name.</returns>
string NameFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression); string NameFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression);
/// <summary> /// <summary>
@ -251,7 +256,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// <param name="message">The message to be displayed. This will always be visible but client-side /// <param name="message">The message to be displayed. This will always be visible but client-side
/// validation may update the associated CSS class.</param> /// validation may update the associated CSS class.</param>
/// <param name="htmlAttributes"> An object that contains the HTML attributes to set for the element. /// <param name="htmlAttributes"> An object that contains the HTML attributes to set for the element.
/// Alternatively, an /// <see cref="IDictionary{string, object}"/> instance containing the HTML attributes. /// Alternatively, an <see cref="IDictionary{string, object}"/> instance containing the HTML attributes.
/// </param> /// </param>
/// <param name="tag">The tag to wrap the <paramref name="message"/> in the generated HTML. /// <param name="tag">The tag to wrap the <paramref name="message"/> in the generated HTML.
/// Its default value is <see cref="ViewContext.ValidationMessageElement" />.</param> /// Its default value is <see cref="ViewContext.ValidationMessageElement" />.</param>
@ -266,13 +271,13 @@ namespace Microsoft.AspNet.Mvc.Rendering
/// </summary> /// </summary>
/// <param name="expression">The expression to be evaluated against the current model.</param> /// <param name="expression">The expression to be evaluated against the current model.</param>
/// <param name="format"> /// <param name="format">
/// The composite format <see langref="string"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx). /// The composite format <see cref="String"/> (see http://msdn.microsoft.com/en-us/library/txafckwd.aspx).
/// </param> /// </param>
/// <typeparam name="TProperty">The type of the <param name="expression"> result.</typeparam> /// <typeparam name="TProperty">The type of the <paramref name="expression"/> result.</typeparam>
/// <returns>A <see langref="string"/> containing the formatted value.</returns> /// <returns>A <see cref="String"/> containing the formatted value.</returns>
/// <remarks> /// <remarks>
/// Converts the <paramref name="expression"/> result to a <see langref="string"/> directly if /// Converts the <paramref name="expression"/> result to a <see cref="String"/> directly if
/// <paramref name="format"/> is <see langref="null"/> or empty. /// <paramref name="format"/> is <c>null</c> or empty.
/// </remarks> /// </remarks>
string ValueFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression, string format); string ValueFor<TProperty>([NotNull] Expression<Func<TModel, TProperty>> expression, string format);
} }

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
} }
/// <summary> /// <summary>
/// Renders the closing </form> tag to the response. /// Renders the &lt;/form&gt; end tag to the response.
/// </summary> /// </summary>
public void EndForm() public void EndForm()
{ {

View File

@ -7,7 +7,6 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using Microsoft.AspNet.Mvc.Core; using Microsoft.AspNet.Mvc.Core;
using Microsoft.AspNet.Mvc.ModelBinding; using Microsoft.AspNet.Mvc.ModelBinding;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.AspNet.Mvc.Rendering.Expressions; using Microsoft.AspNet.Mvc.Rendering.Expressions;
namespace Microsoft.AspNet.Mvc namespace Microsoft.AspNet.Mvc
@ -43,7 +42,7 @@ namespace Microsoft.AspNet.Mvc
/// <summary> /// <summary>
/// <see cref="ViewDataDictionary"/> copy constructor for use when model type may change. This avoids /// <see cref="ViewDataDictionary"/> copy constructor for use when model type may change. This avoids
/// exceptions a derived class may throw when <see cref="SetModel()"/> is called. /// exceptions a derived class may throw when <see cref="SetModel"/> is called.
/// </summary> /// </summary>
public ViewDataDictionary([NotNull] ViewDataDictionary source, object model) public ViewDataDictionary([NotNull] ViewDataDictionary source, object model)
: this(source.MetadataProvider) : this(source.MetadataProvider)

View File

@ -79,10 +79,11 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
} }
/// <remarks> /// <remarks>
/// Example: GetGenericBinder(typeof(IList<>), typeof(List<>), typeof(ListBinder<>), ...) means that the /// Example: <c>GetGenericBinderType(typeof(IList&lt;T&gt;), typeof(List&lt;T&gt;),
/// ListBinder<T> type can update models that implement IList<T>, and if for some reason the existing model /// typeof(ListBinder&lt;T&gt;), ...)</c> means that the <c>ListBinder&lt;T&gt;</c> type can update models that
/// instance is not updatable the binder will create a List<T> object and bind to that instead. This method /// implement <see cref="IList{T}"/>, and if for some reason the existing model instance is not updatable the
/// will return ListBinder<T> or null, depending on whether the type and updatability checks succeed. /// binder will create a <see cref="List{T}"/> object and bind to that instead. This method will return
/// <c>ListBinder&lt;T&gt;</c> or <c>null</c>, depending on whether the type and updatability checks succeed.
/// </remarks> /// </remarks>
private static Type GetGenericBinderType(Type supportedInterfaceType, private static Type GetGenericBinderType(Type supportedInterfaceType,
Type newInstanceType, Type newInstanceType,

View File

@ -140,7 +140,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
protected IModelMetadataProvider Provider { get; set; } protected IModelMetadataProvider Provider { get; set; }
/// <returns> /// <returns>
/// Gets TModel if ModelType is Nullable{TModel}, ModelType otherwise. /// Gets <c>T</c> if <see cref="ModelType"/> is <see cref="Nullable{T}"/>;
/// <see cref="ModelType"/> otherwise.
/// </returns> /// </returns>
public Type RealModelType public Type RealModelType
{ {

View File

@ -9,12 +9,12 @@ using System.Linq;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {
/// <summary> /// <summary>
/// An implementation of <see cref="ModelValidatorProvider"/> which providers validators /// An implementation of <see cref="IModelValidatorProvider"/> which providers validators
/// for attributes which derive from <see cref="ValidationAttribute"/>. It also provides /// for attributes which derive from <see cref="ValidationAttribute"/>. It also provides
/// a validator for types which implement <see cref="IValidatableObject"/>. To support /// a validator for types which implement <see cref="IValidatableObject"/>. To support
/// client side validation, you can either register adapters through the static methods /// client side validation, you can either register adapters through the static methods
/// on this class, or by having your validation attributes implement /// on this class, or by having your validation attributes implement
/// <see cref="IClientValidatable"/>. The logic to support IClientValidatable /// <see cref="IClientModelValidator"/>. The logic to support <see cref="IClientModelValidator"/>
/// is implemented in <see cref="DataAnnotationsModelValidator"/>. /// is implemented in <see cref="DataAnnotationsModelValidator"/>.
/// </summary> /// </summary>
public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider public class DataAnnotationsModelValidatorProvider : AssociatedValidatorProvider

View File

@ -10,8 +10,8 @@ using System.Runtime.Serialization;
namespace Microsoft.AspNet.Mvc.ModelBinding namespace Microsoft.AspNet.Mvc.ModelBinding
{ {
/// <summary> /// <summary>
/// This <see cref="ModelValidatorProvider"/> provides a required ModelValidator for members marked /// This <see cref="IModelValidatorProvider"/> provides a required ModelValidator for members marked
/// as [DataMember(IsRequired=true)]. /// as <c>[DataMember(IsRequired=true)]</c>.
/// </summary> /// </summary>
public class DataMemberModelValidatorProvider : AssociatedValidatorProvider public class DataMemberModelValidatorProvider : AssociatedValidatorProvider
{ {

View File

@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
/// <summary> /// <summary>
/// Identifier of the <see cref="ModelClientValidationRule"/>. If client-side validation is enabled, default /// Identifier of the <see cref="ModelClientValidationRule"/>. If client-side validation is enabled, default
/// validation attribute generator uses this <see langref="string"/> as part of the generated "data-val" /// validation attribute generator uses this <see cref="String"/> as part of the generated "data-val"
/// attribute name. Must be unique in the set of enabled validation rules. /// attribute name. Must be unique in the set of enabled validation rules.
/// </summary> /// </summary>
public string ValidationType { get; private set; } public string ValidationType { get; private set; }

View File

@ -8,7 +8,8 @@ using Xunit;
namespace Microsoft.AspNet.Mvc.Core namespace Microsoft.AspNet.Mvc.Core
{ {
/// <summary> /// <summary>
/// Test the <see cref="IHtmlHelper.DisplayText"/> and <see cref="IHtmlHelper{T}.DisplayTextFor{TValue}"/> methods. /// Test the <see cref="Rendering.IHtmlHelper.DisplayText"/> and
/// <see cref="Rendering.IHtmlHelper{TModel}.DisplayTextFor{TValue}"/> methods.
/// </summary> /// </summary>
public class HtmlHelperDisplayTextTest public class HtmlHelperDisplayTextTest
{ {

View File

@ -67,9 +67,9 @@ namespace Microsoft.AspNet.Mvc.Core.Test
} }
/// <summary> /// <summary>
/// Returns a Task<Task> instead of a Task. This should throw an InvalidOperationException. /// Returns a <see cref="Task{TResult}"/> instead of a <see cref="Task"/>. This should throw an
/// <see cref="InvalidOperationException"/>.
/// </summary> /// </summary>
/// <returns></returns>
public Task UnwrappedTask(int i, string s) public Task UnwrappedTask(int i, string s)
{ {
return Task.Factory.StartNew(async () => await Task.Delay(50)); return Task.Factory.StartNew(async () => await Task.Delay(50));