DiagramText Class
The text of a label of a diagram: plain text, or markdown with bold and italic parts.
public sealed class DiagramText : IEquatable<DiagramText>- Implements
Constructors
| Name | Description |
|---|---|
| DiagramText(string, DiagramTextFormat) | Initializes a new instance of the DiagramText class. |
DiagramText(string, DiagramTextFormat)
DiagramText.csInitializes a new instance of the DiagramText class.
public DiagramText(string text, DiagramTextFormat format = DiagramTextFormat.Plain)Parameters
textstring- The text. A line feed starts a new line.
formatDiagramTextFormat- How the text is read.
Properties
| Name | Description |
|---|---|
| Format | Gets how the text is read. |
| IsEmpty | Gets a value that indicates whether the text is empty. |
| Text | Gets the text. |
Format
DiagramText.csIsEmpty
DiagramText.csText
DiagramText.csMethods
| Name | Description |
|---|---|
| Equals(DiagramText?) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Determines whether the specified object is equal to the current object. |
| GetHashCode() | Serves as the default hash function. |
| Markdown(string) | Creates a markdown text. |
| ToString() | Returns the text. |
Equals overloads
Equals(DiagramText?)
DiagramText.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(DiagramText? other)Parameters
otherDiagramText?- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
DiagramText.csGetHashCode()
DiagramText.csMarkdown(string)
DiagramText.csCreates a markdown text.
public static DiagramText Markdown(string text)ToString()
DiagramText.csOperators
| Name | Description |
|---|---|
| implicit operator DiagramText?(string?) | Converts a text to a plain DiagramText. |
implicit operator DiagramText?(string?)
DiagramText.csConverts a text to a plain DiagramText.
public static implicit operator DiagramText?(string? text)