using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Mvc.Rendering
{
///
/// An for Linq expressions.
///
/// The of the model.
public interface IHtmlHelper
{
///
/// Gets or sets the character that replaces periods in the ID attribute of an element.
///
string IdAttributeDotReplacement { get; set; }
///
/// Gets the view bag.
///
dynamic ViewBag { get; }
///
/// Gets the context information about the view.
///
ViewContext ViewContext { get; }
///
/// Gets the current view data.
///
ViewDataDictionary ViewData { get; }
///
/// Converts the value of the specified object to an HTML-encoded string.
///
/// The object to encode.
/// The HTML-encoded string.
string Encode(object value);
///
/// Converts the specified string to an HTML-encoded string.
///
/// The string to encode.
/// The HTML-encoded string.
string Encode(string value);
///
/// Creates an HTML element ID using the specified element name.
///
/// The name of the HTML element.
/// The ID of the HTML element.
string GenerateIdFromName(string name);
///
/// Gets the full HTML field name for the given expression .
///
/// Name of an expression, relative to the current model.
/// An that represents HTML markup.
HtmlString Name(string name);
///
/// Gets the full HTML field name for the given .
///
/// The the returns.
/// An expression, relative to the current model.
/// An that represents HTML markup.
HtmlString NameFor([NotNull] Expression> expression);
///
/// Wraps HTML markup in an , which will enable HTML markup to be
/// rendered to the output without getting HTML encoded.
///
/// HTML markup string.
/// An that represents HTML markup.
HtmlString Raw(string value);
///
/// Wraps HTML markup from the string representation of an object in an ,
/// which will enable HTML markup to be rendered to the output without getting HTML encoded.
///
/// object with string representation as HTML markup.
/// An that represents HTML markup.
HtmlString Raw(object value);
///
/// Returns a partial view in string format.
///
/// The name of the partial view to render and return.
/// A model to pass into the partial view.
/// A to pass into the partial view.
/// A task that represents when rendering of the partial view into a string has completed.
Task PartialAsync([NotNull] string partialViewName, object model, ViewDataDictionary viewData);
///
/// Renders a partial view.
///
/// The name of the partial view to render.
/// A model to pass into the partial view.
/// A to pass into the partial view.
/// A task that represents when rendering has completed.
Task RenderPartialAsync([NotNull] string partialViewName, object model, ViewDataDictionary viewData);
///
/// Render an input element of type "text".
///
///
/// Rendered element's name. Also use this name to find value in submitted data or view data. Use view data
/// only if value is not in submitted data and is null.
///
///
/// If non-null, value to include in the element. Ignore if named value is found in submitted data.
///
///
///
/// containing additional HTML attributes.
///
/// New containing the rendered HTML.
HtmlString TextBox(string name, object value, string format, IDictionary htmlAttributes);
///
/// Render an input element of type "text".
///
///
/// An expression that identifies the object that contains the properties to render.
///
///
///
/// containing additional HTML attributes.
///
/// New containing the rendered HTML.
HtmlString TextBoxFor([NotNull] Expression> expression, string format,
IDictionary htmlAttributes);
///
/// Returns an unordered list (ul element) of validation messages that are in the
/// object.
///
/// true to have the summary display model-level errors only, or false to
/// have the summary display all errors.
/// The message to display with the validation summary.
/// A dictionary that contains the HTML attributes for the element.
/// An that contains an unordered list (ul element) of validation messages.
///
HtmlString ValidationSummary(bool excludePropertyErrors, string message,
IDictionary htmlAttributes);
///
/// Returns the model value for the given expression .
///
/// Name of an expression, relative to the current model.
/// The optional format string to apply to the value.
/// An that represents HTML markup.
HtmlString Value([NotNull] string name, string format);
///
/// Returns the model value for the given expression .
///
/// An expression, relative to the current model.
/// The optional format string to apply to the value.
/// An that represents HTML markup.
HtmlString ValueFor([NotNull] Expression> expression, string format);
}
}