Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
HorizontalRule.cs
1using System.Threading.Tasks;
3
5{
10 {
11 private readonly string row;
12
19 : base(Document)
20 {
21 this.row = Row;
22 }
23
27 public string Row => this.row;
28
33 public override Task Render(IRenderer Output) => Output.Render(this);
34
38 public override bool InlineSpanElement => false;
39
46 public override bool SameMetaData(MarkdownElement E)
47 {
48 return E is HorizontalRule x &&
49 x.row == this.row &&
50 base.SameMetaData(E);
51 }
52
58 public override bool Equals(object obj)
59 {
60 return obj is HorizontalRule x &&
61 this.row == x.row &&
62 base.Equals(obj);
63 }
64
69 public override int GetHashCode()
70 {
71 int h1 = base.GetHashCode();
72 int h2 = this.row?.GetHashCode() ?? 0;
73
74 h1 = ((h1 << 5) + h1) ^ h2;
75
76 return h1;
77 }
78
83 public override void IncrementStatistics(MarkdownStatistics Statistics)
84 {
85 Statistics.NrHorizontalRules++;
86 }
87
88 }
89}
Contains a markdown document. This markdown document class supports original markdown,...
Contains some basic statistical information about a Markdown document.
int NrHorizontalRules
Number of horizontal rules.
Abstract base class for block elements.
Definition: BlockElement.cs:7
override bool SameMetaData(MarkdownElement E)
If the current object has same meta-data as E (but not necessarily same content).
override bool InlineSpanElement
If the element is an inline span element.
override Task Render(IRenderer Output)
Renders the element.
override int GetHashCode()
Serves as the default hash function.
override void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
string Row
Original Row generating the horizontal rule.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
HorizontalRule(MarkdownDocument Document, string Row)
Horizontal rule
Abstract base class for all markdown elements.
MarkdownDocument Document
Markdown document.
Interface for Markdown renderers.
Definition: IRenderer.cs:12