MarkdownGenericAttributes Class

The generic attributes of an element: an id, classes, and other attributes, as {#id .class name=value} writes them.

public sealed class MarkdownGenericAttributes : IEquatable<MarkdownGenericAttributes>

Remarks

Two instances are equal when they have the same id, and the same classes and properties in the same order. A default ImmutableArray<T> is read as an empty one.

Implements

Constructors

NameDescription
MarkdownGenericAttributes(string?, ImmutableArray<string>, ImmutableArray<KeyValuePair<string, string?>>)The generic attributes of an element: an id, classes, and other attributes, as {#id .class name=value} writes them.

MarkdownGenericAttributes(string?, ImmutableArray<string>, ImmutableArray<KeyValuePair<string, string?>>)

MarkdownGenericAttributes.cs

The generic attributes of an element: an id, classes, and other attributes, as {#id .class name=value} writes them.

public MarkdownGenericAttributes(string? Id, ImmutableArray<string> Classes, ImmutableArray<KeyValuePair<string, string?>> Properties)

Parameters

Id string?
The id, or null when there is none.
Classes ImmutableArray<string>
The classes.
Properties ImmutableArray<KeyValuePair<string, string?>>
The other attributes, whose value is null when they are written without one, such as {hidden}.

Remarks

Two instances are equal when they have the same id, and the same classes and properties in the same order. A default ImmutableArray<T> is read as an empty one.

Properties

NameDescription
ClassesGets the classes.
EmptyGets attributes without id, classes or properties.
IdThe id, or null when there is none.
IsEmptyGets a value indicating whether the attributes have no id, no class and no property.
PropertiesGets the other attributes, whose value is null when they are written without one, such as {hidden}.

Gets the classes.

public ImmutableArray<string> Classes { get; init; }

Gets attributes without id, classes or properties.

public static MarkdownGenericAttributes Empty { get; }

The id, or null when there is none.

public string? Id { get; init; }

Property value

string?

Gets a value indicating whether the attributes have no id, no class and no property.

public bool IsEmpty { get; }

Property value

bool

Gets the other attributes, whose value is null when they are written without one, such as {hidden}.

public ImmutableArray<KeyValuePair<string, string?>> Properties { get; init; }

Methods

NameDescription
Deconstruct(string?, ImmutableArray<string>, ImmutableArray<KeyValuePair<string, string?>>)
Equals(MarkdownGenericAttributes?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(string?, ImmutableArray<string>, ImmutableArray<KeyValuePair<string, string?>>)

public void Deconstruct(out string? Id, out ImmutableArray<string> Classes, out ImmutableArray<KeyValuePair<string, string?>> Properties)

No documentation is available.

Equals overloads

Equals(MarkdownGenericAttributes?)

MarkdownGenericAttributes.cs
public bool Equals(MarkdownGenericAttributes? other)
Parameters
other MarkdownGenericAttributes?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(MarkdownGenericAttributes?, MarkdownGenericAttributes?)
operator !=(MarkdownGenericAttributes?, MarkdownGenericAttributes?)

operator ==(MarkdownGenericAttributes?, MarkdownGenericAttributes?)

public static bool operator ==(MarkdownGenericAttributes? left, MarkdownGenericAttributes? right)

No documentation is available.

operator !=(MarkdownGenericAttributes?, MarkdownGenericAttributes?)

public static bool operator !=(MarkdownGenericAttributes? left, MarkdownGenericAttributes? right)

No documentation is available.