LocalizedHtmlString Class

An Microsoft.AspNetCore.Html.IHtmlContent with localized content.

Namespace
Microsoft.AspNetCore.Mvc.Localization
Assemblies
  • Microsoft.AspNetCore.Mvc.Localization

Syntax

public class LocalizedHtmlString : IHtmlContent
class Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString

Constructors

LocalizedHtmlString(System.String, System.String)

Creates an instance of Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.

Arguments:
  • name (System.String) – The name of the string resource.
  • value (System.String) – The string resource.
public LocalizedHtmlString(string name, string value)
LocalizedHtmlString(System.String, System.String, System.Boolean)

Creates an instance of Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.

Arguments:
  • name (System.String) – The name of the string resource.
  • value (System.String) – The string resource.
  • isResourceNotFound (System.Boolean) – A flag that indicates if the resource is not found.
public LocalizedHtmlString(string name, string value, bool isResourceNotFound)
LocalizedHtmlString(System.String, System.String, System.Boolean, System.Object[])

Creates an instance of Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.

Arguments:
  • name (System.String) – The name of the string resource.
  • value (System.String) – The string resource.
  • isResourceNotFound (System.Boolean) – A flag that indicates if the resource is not found.
  • arguments (System.Object<System.Object>[]) – The values to format the <em>value</em> with.
public LocalizedHtmlString(string name, string value, bool isResourceNotFound, params object[] arguments)

Properties

Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.IsResourceNotFound

Gets a flag that indicates if the resource is not found.

Return type:System.Boolean
public bool IsResourceNotFound { get; }
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Name

The name of the string resource.

Return type:System.String
public string Name { get; }
Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString.Value

The string resource.

Return type:System.String
public string Value { get; }

Methods

WriteTo(System.IO.TextWriter, System.Text.Encodings.Web.HtmlEncoder)
public void WriteTo(TextWriter writer, HtmlEncoder encoder)