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