Show / Hide Table of Contents

    Class Message<TModel>

    Wraps the output of a message to display to a user.

    Inheritance
    System.Object
    FormComponent<TModel>
    Message<TModel>
    Implements
    IFormComponent<TModel>
    Microsoft.AspNetCore.Html.IHtmlContent
    System.IDisposable
    Inherited Members
    FormComponent<TModel>.IsSelfClosing
    FormComponent<TModel>.Form
    FormComponent<TModel>.Initialise()
    FormComponent<TModel>.WriteTo(TextWriter, HtmlEncoder)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ChameleonForms.Component
    Assembly: ChameleonForms.dll
    Syntax
    public class Message<TModel> : FormComponent<TModel>, IFormComponent<TModel>, IHtmlContent, IDisposable
    Type Parameters
    Name Description
    TModel

    The view model type for the current view

    Constructors

    | Improve this Doc View Source

    Message(IForm<TModel>, MessageType, IHtmlContent)

    Creates a message.

    Declaration
    public Message(IForm<TModel> form, MessageType messageType, IHtmlContent heading)
    Parameters
    Type Name Description
    IForm<TModel> form

    The form the message is being created in

    MessageType messageType

    The type of message to display

    Microsoft.AspNetCore.Html.IHtmlContent heading

    The heading for the message

    | Improve this Doc View Source

    Message(IForm<TModel>, MessageType, String)

    Creates a message.

    Declaration
    public Message(IForm<TModel> form, MessageType messageType, string heading)
    Parameters
    Type Name Description
    IForm<TModel> form

    The form the message is being created in

    MessageType messageType

    The type of message to display

    System.String heading

    The heading for the message

    Methods

    | Improve this Doc View Source

    Begin()

    Returns the HTML representation of the beginning of the form component.

    Declaration
    public override IHtmlContent Begin()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The beginning HTML for the form component

    Overrides
    ChameleonForms.Component.FormComponent<TModel>.Begin()
    | Improve this Doc View Source

    Dispose()

    Called when form component is created within a using block: writes the end tag(s) of the component.

    Declaration
    public override void Dispose()
    Overrides
    ChameleonForms.Component.FormComponent<TModel>.Dispose()
    | Improve this Doc View Source

    End()

    Returns the HTML representation of the end of the form component.

    Declaration
    public override IHtmlContent End()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The ending HTML for the form component

    Overrides
    ChameleonForms.Component.FormComponent<TModel>.End()
    | Improve this Doc View Source

    Paragraph(IHtmlContent)

    Creates the HTML for a paragraph in the message.

    Declaration
    public virtual IHtmlContent Paragraph(IHtmlContent paragraph)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent paragraph

    The paragraph to output

    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the paragraph

    | Improve this Doc View Source

    Paragraph(Func<Object, IHtmlContent>)

    Creates the HTML for a paragraph in the message.

    Declaration
    public virtual IHtmlContent Paragraph(Func<dynamic, IHtmlContent> paragraph)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> paragraph

    The paragraph to output as a templated razor delegate

    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the paragraph

    | Improve this Doc View Source

    Paragraph(String)

    Creates the HTML for a paragraph in the message.

    Declaration
    public virtual IHtmlContent Paragraph(string paragraph)
    Parameters
    Type Name Description
    System.String paragraph

    The paragraph to output

    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The HTML for the paragraph

    Implements

    IFormComponent<TModel>
    Microsoft.AspNetCore.Html.IHtmlContent
    System.IDisposable

    Extension Methods

    HtmlAttributesExtensions.ToHtmlAttributes(Object)
    HtmlContentExtensions.ToHtmlString(IHtmlContent)
    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.