Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AutomaticLinkMail.cs
1using System.Collections.Generic;
2using System.Threading.Tasks;
4
6{
11 {
12 private readonly string eMail;
13
20 : base(Document)
21 {
22 this.eMail = EMail;
23 }
24
28 public string EMail => this.eMail;
29
34 public override Task Render(IRenderer Output) => Output.Render(this);
35
37 public override string ToString()
38 {
39 return this.eMail;
40 }
41
45 public override bool InlineSpanElement => true;
46
52 public override bool Equals(object obj)
53 {
54 return obj is AutomaticLinkMail x &&
55 this.eMail == x.eMail &&
56 base.Equals(obj);
57 }
58
63 public override int GetHashCode()
64 {
65 int h1 = base.GetHashCode();
66 int h2 = this.eMail?.GetHashCode() ?? 0;
67
68 h1 = ((h1 << 5) + h1) ^ h2;
69
70 return h1;
71 }
72
77 public override void IncrementStatistics(MarkdownStatistics Statistics)
78 {
79 if (Statistics.IntMailHyperlinks is null)
80 Statistics.IntMailHyperlinks = new List<string>();
81
82 if (!Statistics.IntMailHyperlinks.Contains(this.eMail))
83 Statistics.IntMailHyperlinks.Add(this.eMail);
84
85 Statistics.NrMailHyperLinks++;
86 Statistics.NrHyperLinks++;
87 }
88
89 }
90}
Contains a markdown document. This markdown document class supports original markdown,...
Contains some basic statistical information about a Markdown document.
int NrMailHyperLinks
Number of mail hyperlinks.
int NrHyperLinks
Number of hyperlinks (total).
Abstract base class for all markdown elements.
MarkdownDocument Document
Markdown document.
Interface for Markdown renderers.
Definition: IRenderer.cs:12