C# Class Sakura.AspNetCore.Mvc.TagHelpers.SelectValueOptionTagHelper

Inheritance: Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
Mostra file Open project: sgjsakura/AspNetCore Class Usage Examples

Public Methods

Method Description
Process ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output ) : void

Synchronously executes the T:Microsoft.AspNet.Razor.TagHelpers.TagHelper with the given context and output.

Protected Methods

Method Description
GetSelectedValueCompareModeFromContext ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context ) : System.StringComparison

Try to get the selected value comparison mode from the context. If no mode is set, this method will returns DefaultSelectValueCompareMode.

GetSelectedValueFromContext ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context ) : string

Try to get the selected value string from the context. If no selected value is set, this method will returns null.

MarkAsSelected ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output ) : void

Make the current option as selected.

Private Methods

Method Description
SetSelectedValue ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, string value, System.StringComparison comparison = DefaultSelectValueCompareMode ) : void

Method Details

GetSelectedValueCompareModeFromContext() protected method

Try to get the selected value comparison mode from the context. If no mode is set, this method will returns DefaultSelectValueCompareMode.
protected GetSelectedValueCompareModeFromContext ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context ) : System.StringComparison
context Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext The tag helper context.
return System.StringComparison

GetSelectedValueFromContext() protected method

Try to get the selected value string from the context. If no selected value is set, this method will returns null.
protected GetSelectedValueFromContext ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context ) : string
context Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext The tag helper context.
return string

MarkAsSelected() protected method

Make the current option as selected.
protected MarkAsSelected ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output ) : void
output Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput Tag output context.
return void

Process() public method

Synchronously executes the T:Microsoft.AspNet.Razor.TagHelpers.TagHelper with the given context and output.
public Process ( Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext context, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput output ) : void
context Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext Contains information associated with the current HTML tag.
output Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput A stateful HTML element used to generate an HTML tag.
return void