Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
UnnumberedItem.cs
1using System.Threading.Tasks;
3
5{
10 {
11 private readonly string prefix;
12
20 : base(Document, Child)
21 {
22 this.prefix = Prefix;
23 }
24
28 public string Prefix => this.prefix;
29
34 public override Task Render(IRenderer Output) => Output.Render(this);
35
39 public override bool InlineSpanElement => this.Child.InlineSpanElement;
40
49 {
50 return new UnnumberedItem(Document, this.prefix, Child);
51 }
52
59 public override bool SameMetaData(MarkdownElement E)
60 {
61 return E is UnnumberedItem x &&
62 x.prefix == this.prefix &&
63 base.SameMetaData(E);
64 }
65
71 public override bool Equals(object obj)
72 {
73 return obj is UnnumberedItem x &&
74 this.prefix == x.prefix &&
75 base.Equals(obj);
76 }
77
82 public override int GetHashCode()
83 {
84 int h1 = base.GetHashCode();
85 int h2 = this.prefix?.GetHashCode() ?? 0;
86
87 h1 = ((h1 << 5) + h1) ^ h2;
88
89 return h1;
90 }
91
96 public override void IncrementStatistics(MarkdownStatistics Statistics)
97 {
98 Statistics.NrUnnumberedItems++;
99 Statistics.NrListItems++;
100 }
101
102 }
103}
Contains a markdown document. This markdown document class supports original markdown,...
Contains some basic statistical information about a Markdown document.
int NrUnnumberedItems
Number of unnumbered items.
int NrListItems
Number of list items (total).
Abstract base class for block elements with one child.
Represents an unnumbered item in an ordered list.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
override MarkdownElementSingleChild Create(MarkdownElement Child, MarkdownDocument Document)
Creates an object of the same type, and meta-data, as the current object, but with content defined by...
override bool InlineSpanElement
If the element is an inline span element.
override void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
override Task Render(IRenderer Output)
Renders the element.
UnnumberedItem(MarkdownDocument Document, string Prefix, MarkdownElement Child)
Represents an unnumbered item in an ordered list.
override int GetHashCode()
Serves as the default hash function.
override bool SameMetaData(MarkdownElement E)
If the current object has same meta-data as E (but not necessarily same content).
Abstract base class for all markdown elements.
abstract bool InlineSpanElement
If the element is an inline span element.
MarkdownDocument Document
Markdown document.
Abstract base class for all markdown elements with one child element.
Interface for Markdown renderers.
Definition: IRenderer.cs:12