Click or drag to resize

Html Structure

Represents an immutable html string.

Namespace:  MicaSystems.Utils
Assembly:  MicaSystems.Utils (in MicaSystems.Utils.dll) Version: 1.0.0.0 (1.1.0.123)
Syntax
C#
[DataContractAttribute]
public struct Html : IHtmlString

The Html type exposes the following members.

Constructors
  NameDescription
Public methodHtml(FormattableString)
Creates a new Html from the given FormattableString. Static parts of the template will be considered safe and won't be encoded while variable parts (between '{' and '}') will be html encoded. This constructor will use the current culture for formatting.
Public methodHtml(IHtmlString)
Creates a new Html from the given IHtmlString.
Public methodHtml(IFormatProvider, FormattableString)
Creates a new Html from the given FormattableString and IFormatProvider. Static parts of the template will be considered safe and won't be encoded while variable parts (between '{' and '}') will be html encoded.
Top
Properties
  NameDescription
Public propertyIsEmpty
Returns true if this html string contains no character.
Public propertyLength
Returns the length (after encoding) of this html string.
Top
Methods
  NameDescription
Public methodStatic memberConcat(IEnumerableIHtmlString)
Concatenates the given html strings.
Public methodStatic memberConcat(IHtmlString)
Concatenates the given html strings.
Public methodStatic memberConcat(Html)
Concatenates the given html strings.
Public methodStatic memberConcat(IEnumerableHtml)
Concatenates the given html strings.
Public methodStatic memberCreate
Creates a new Html instance from the given FormattableString. Static parts of the template will be considered safe and won't be encoded while variable parts (between '{' and '}') will be html encoded. The current culture is used for formatting.
Public methodStatic memberFromText
Creates a new Html instance from the given text (will be encoded).
Public methodStatic memberFromTrustedHtml
Creates a new Html instance from the given html string (won't be encoded). Use this method only if you are absolutely certain that this string cannot contain malicious html code.
Public methodStatic memberJoin(Html, IEnumerableHtml)
Concatenates all the given html strings, using the given separator. This method works in a similar way to Join(String, String)
Public methodStatic memberJoin(Html, IEnumerableIHtmlString)
Concatenates all the given html strings, using the given separator. This method works in a similar way to Join(String, String)
Public methodToHtmlString
Returns an HTML-encoded string.
Public methodToString (Overrides ValueTypeToString.)
Top
Operators
Fields
  NameDescription
Public fieldStatic memberEmpty
Represents an empty html string.
Top
Extension Methods
  NameDescription
Public Extension MethodAsT
Casts an object to another type. Returns default(T) if the object is null.
(Defined by Utils_Other.)
Public Extension MethodEqualsAll
Checks that this object is equal to every object in parameters.
(Defined by Utils_Other.)
Public Extension MethodEqualsAny
Checks that this object is equal to at least one of the parameters.
(Defined by Utils_Other.)
Public Extension MethodGetString
Converts an object to String using ToString() method, else returns String.Empty.
(Defined by Utils_Other.)
Public Extension MethodIsGenericListOverloaded.
Checks if this object is a System.Collections.Generic.List.
(Defined by Utils_Linq.)
Public Extension MethodIsGenericList(Type)Overloaded.
Checks if this object is a System.Collections.Generic.List using type as T.
(Defined by Utils_Linq.)
Public Extension MethodSerializeOverloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerialize(String)Overloaded.
Serializes an object into an XML document.
(Defined by Utils_Xml.)
Public Extension MethodSerializeJsonOverloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(ListType)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Public Extension MethodSerializeJson(DataContractJsonSerializerSettings)Overloaded.
Serializes an object using a DataContractJsonSerializer.
(Defined by Utils_String.)
Top
See Also