Attributes Class

Provides the utilities for the HTML attributes.

C#
public static class Attributes
Inheritance
Attributes

Methods

GetAddingClassModifier(IEnumerable<string>)

Gets the function that returns the modified TagStruct object.

GetReplacingClassModifier(IEnumerable<string>)

Gets the function that returns the modified TagStruct object.

GetReplacingIdModifier(string)

Gets the function that returns the modified TagStruct object.

GetAddingModifier(Func<string, bool>, IEnumerable<(string Name, string Value)>)

Gets the function that returns the modified TagStruct object.

Methods Detail

GetAddingClassModifier(IEnumerable<string>)

Gets the function that returns the modified TagStruct object.

C#
public static Func<TagStruct, TagStruct> GetAddingClassModifier(IEnumerable<string> values)

Parameters

values
IEnumerable<string>

The values of the class attribute to be added.

Returns

The function that takes the original TagStruct and returns the modified TagStruct.

GetReplacingClassModifier(IEnumerable<string>)

Gets the function that returns the modified TagStruct object.

C#
public static Func<TagStruct, TagStruct> GetReplacingClassModifier(IEnumerable<string> values)

Parameters

values
IEnumerable<string>

The values of the class attribute to be replaced.

Returns

The function that takes the original TagStruct and returns the modified TagStruct.

GetReplacingIdModifier(string)

Gets the function that returns the modified TagStruct object.

C#
public static Func<TagStruct, TagStruct> GetReplacingIdModifier(string value)

Parameters

value
string

The value of the id attribute to be replaced.

Returns

The function that takes the original TagStruct and returns the modified TagStruct.

GetAddingModifier(Func<string, bool>, IEnumerable<(string Name, string Value)>)

Gets the function that returns the modified TagStruct object.

C#
public static Func<TagStruct, TagStruct> GetAddingModifier(Func<string, bool> isDuplicated, IEnumerable<(string Name, string Value)> attributes)

Parameters

isDuplicated
Func<string, bool>

The function that takes the attribute name and returns whether the name is duplicated.

attributes
IEnumerable<(string Name, string Value)>

The attributes to be added.

Returns

The function that takes the original TagStruct and returns the modified TagStruct.