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
| Name | Description |
|---|---|
| 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.csThe 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
Idstring?- The id, or
nullwhen there is none. ClassesImmutableArray<string>- The classes.
PropertiesImmutableArray<KeyValuePair<string, string?>>- The other attributes, whose value is
nullwhen 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
| Name | Description |
|---|---|
| Classes | Gets the classes. |
| Empty | Gets attributes without id, classes or properties. |
| Id | The id, or null when there is none. |
| IsEmpty | Gets a value indicating whether the attributes have no id, no class and no property. |
| Properties | Gets the other attributes, whose value is null when they are written without one, such as {hidden}. |
Classes
MarkdownGenericAttributes.csGets attributes without id, classes or properties.
public static MarkdownGenericAttributes Empty { get; }Property value
IsEmpty
MarkdownGenericAttributes.csProperties
MarkdownGenericAttributes.csGets the other attributes, whose value is null when they are written without one, such as {hidden}.
public ImmutableArray<KeyValuePair<string, string?>> Properties { get; init; }Property value
Methods
| Name | Description |
|---|---|
| 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)Parameters
Idstring?ClassesImmutableArray<string>PropertiesImmutableArray<KeyValuePair<string, string?>>
No documentation is available.
Equals overloads
Equals(MarkdownGenericAttributes?)
MarkdownGenericAttributes.cspublic bool Equals(MarkdownGenericAttributes? other)No documentation is available.
Equals(object?)
GetHashCode()
MarkdownGenericAttributes.csToString()
Operators
| Name | Description |
|---|---|
| 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.