Eighty

Class Attr

Represents an HTML attribute.

Inheritance
Implements
Declaration
public sealed class Attr : ValueType

Constructors

Attr(String)

Create a Boolean HTML attribute.

Declaration
public Attr(string name)
Parameters
Type Name Description

String

name

The name of the attribute.

Attr(String, String)

Create an HTML attribute.

Declaration
public Attr(string name, string value)
Parameters
Type Name Description

String

name

The name of the attribute.

String

value

The value.

Methods

Equals(Attr)

Declaration
public bool Equals(Attr attr)
Parameters
Type Name Description

Attr

attr

Returns
Type Description

Boolean

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description

Object

other

Returns
Type Description

Boolean

FromValueTuple((String, String))

Create an HTML attribute.

Declaration
public static Attr FromValueTuple((string, string) nameValue)
Parameters
Type Name Description

(, )<String, String>

nameValue

The name and value of the attribute.

Returns
Type Description

Attr

An Attr.

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description

Int32

Raw(String)

Create a Boolean HTML attribute without HTML-encoding the name first.

Declaration
public static Attr Raw(string name)
Parameters
Type Name Description

String

name

The pre-encoded name.

Returns
Type Description

Attr

An HTML attribute.

Raw(String, String)

Create an HTML attribute without HTML-encoding the name and value first.

Declaration
public static Attr Raw(string name, string value)
Parameters
Type Name Description

String

name

The pre-encoded name.

String

value

The pre-encoded value.

Returns
Type Description

Attr

An HTML attribute.

Operators

Implicit((String, String) to Attr)

Create an HTML attribute.

Declaration
public static implicit operator Attr((string, string) nameValue)
Parameters
Type Name Description

(, )<String, String>

nameValue

The name and value of the attribute.

Returns
Type Description

Attr

Implements

System.IEquatable<T>