Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AutomaticLinkUrl.cs
1using System.Collections.Generic;
2using System.Threading.Tasks;
4
6{
11 {
12 private readonly string url;
13
20 : base(Document)
21 {
22 this.url = URL;
23 }
24
28 public string URL => this.url;
29
34 public override Task Render(IRenderer Output) => Output.Render(this);
35
37 public override string ToString()
38 {
39 return this.url;
40 }
41
45 public override bool InlineSpanElement => true;
46
52 public override bool Equals(object obj)
53 {
54 return obj is AutomaticLinkUrl x &&
55 this.url == x.url &&
56 base.Equals(obj);
57 }
58
63 public override int GetHashCode()
64 {
65 int h1 = base.GetHashCode();
66 int h2 = this.url?.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.IntUrlHyperlinks is null)
80 Statistics.IntUrlHyperlinks = new List<string>();
81
82 if (!Statistics.IntUrlHyperlinks.Contains(this.url))
83 Statistics.IntUrlHyperlinks.Add(this.url);
84
85 Statistics.NrUrlHyperLinks++;
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 NrUrlHyperLinks
Number of URL 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