Add xml docs for IHtmlGenerator

This commit is contained in:
Andreas Müller 2019-10-10 01:54:56 +02:00 committed by Pranav K
parent 88ca28ba23
commit 0859105e86
1 changed files with 103 additions and 6 deletions

View File

@ -216,6 +216,21 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
string method,
object htmlAttributes);
/// <summary>
/// Generate a &lt;input type="hidden"&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model.</param>
/// <param name="value">The value which is injected into the element</param>
/// <param name="useViewData">Whether to use the ViewData to generate this element</param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateHidden(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -224,6 +239,20 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
bool useViewData,
object htmlAttributes);
/// <summary>
/// Generate a &lt;label&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model. Used to set the target of the label.</param>
/// <param name="labelText">Text used to render this label.</param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateLabel(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -231,6 +260,20 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
string labelText,
object htmlAttributes);
/// <summary>
/// Generate a &lt;input type="password"&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model.</param>
/// <param name="value">Value used to prefill the checkbox</param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GeneratePassword(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -238,6 +281,21 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
object value,
object htmlAttributes);
/// <summary>
/// Generate a &lt;input type="radio"&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model.</param>
/// <param name="value">value of the given radio button</param>
/// <param name="isChecked">Whether or not the radio button is checked</param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateRadioButton(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -384,6 +442,21 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
/// </returns>
IHtmlContent GenerateGroupsAndOptions(string optionLabel, IEnumerable<SelectListItem> selectList);
/// <summary>
/// Generates a &lt;textarea&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model.</param>
/// <param name="rows"></param>
/// <param name="columns"></param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateTextArea(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -392,6 +465,21 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
int columns,
object htmlAttributes);
/// <summary>
/// Generates a &lt;input type="text"&gt; element
/// </summary>
/// <param name="viewContext">A <see cref="ViewContext"/> instance for the current scope.</param>
/// <param name="modelExplorer">The <see cref="ModelExplorer"/> for the <paramref name="expression"/>.</param>
/// <param name="expression">Expression name, relative to the current model.</param>
/// <param name="value"></param>
/// <param name="format"></param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateTextBox(
ViewContext viewContext,
ModelExplorer modelExplorer,
@ -420,12 +508,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
/// An <see cref="object"/> that contains the HTML attributes for the element. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the HTML attributes.
/// </param>
/// <returns>
/// A <see cref="TagBuilder"/> containing a <paramref name="tag"/> element if the
/// <paramref name="viewContext"/>'s <see cref="ActionContext.ModelState"/> contains an error for the
/// <paramref name="expression"/> or (as a placeholder) if client-side validation is enabled. <c>null</c> if
/// the <paramref name="expression"/> is valid and client-side validation is disabled.
/// </returns>
/// <returns></returns>
/// <remarks><see cref="ViewContext.ValidationMessageElement"/> is <c>"span"</c> by default.</remarks>
TagBuilder GenerateValidationMessage(
ViewContext viewContext,
@ -435,6 +518,20 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
string tag,
object htmlAttributes);
/// <summary>
/// Generates a &lt;div&gt; element which contains a list of validation errors.
/// </summary>
/// <param name="viewContext"></param>
/// <param name="excludePropertyErrors"></param>
/// <param name="message"></param>
/// <param name="headerTag"></param>
/// <param name="htmlAttributes">
/// An <see cref="object"/> that contains the parameters for a route. The parameters are retrieved through
/// reflection by examining the properties of the <see cref="object"/>. This <see cref="object"/> is typically
/// created using <see cref="object"/> initializer syntax. Alternatively, an
/// <see cref="IDictionary{String, Object}"/> instance containing the route parameters.
/// </param>
/// <returns></returns>
TagBuilder GenerateValidationSummary(
ViewContext viewContext,
bool excludePropertyErrors,