Skip to content

Commit

Permalink
Add xml docs for IHtmlGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
taori authored and pranavkm committed Oct 9, 2019
1 parent 88ca28b commit 0859105
Showing 1 changed file with 103 additions and 6 deletions.
109 changes: 103 additions & 6 deletions src/Mvc/Mvc.ViewFeatures/src/IHtmlGenerator.cs
Expand Up @@ -216,6 +216,21 @@ public interface IHtmlGenerator
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,
Expand All @@ -224,20 +239,63 @@ public interface IHtmlGenerator
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,
string expression,
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,
string expression,
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,
Expand Down Expand Up @@ -384,6 +442,21 @@ public interface IHtmlGenerator
/// </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,
Expand All @@ -392,6 +465,21 @@ public interface IHtmlGenerator
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,
Expand Down Expand Up @@ -420,12 +508,7 @@ public interface IHtmlGenerator
/// 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,
Expand All @@ -435,6 +518,20 @@ public interface IHtmlGenerator
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,
Expand Down

0 comments on commit 0859105

Please sign in to comment.