Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MultimediaReference.cs
1using System.Collections.Generic;
2using System.Threading.Tasks;
4
6{
11 {
12 private readonly bool aloneInParagraph;
13
21 public MultimediaReference(MarkdownDocument Document, LinkedList<MarkdownElement> ChildElements, string Label, bool AloneInParagraph)
22 : base(Document, ChildElements, Label)
23 {
24 this.aloneInParagraph = AloneInParagraph;
25 }
26
30 public bool AloneInParagraph => this.aloneInParagraph;
31
36 public override Task Render(IRenderer Output) => Output.Render(this);
37
41 public override bool OutsideParagraph => true;
42
46 public override bool InlineSpanElement => true;
47
53 public override bool Equals(object obj)
54 {
55 return obj is MultimediaReference x &&
56 this.aloneInParagraph == x.aloneInParagraph &&
57 base.Equals(obj);
58 }
59
64 public override int GetHashCode()
65 {
66 int h1 = base.GetHashCode();
67 int h2 = this.aloneInParagraph.GetHashCode();
68
69 h1 = ((h1 << 5) + h1) ^ h2;
70
71 return h1;
72 }
73
78 public override void IncrementStatistics(MarkdownStatistics Statistics)
79 {
81 Multimedia.IncrementStatistics(Statistics, Multimedia?.Items);
82 }
83 }
84}
Contains a markdown document. This markdown document class supports original markdown,...
Multimedia GetReference(string Label)
Gets the multimedia information referenced by a label.
Contains some basic statistical information about a Markdown document.
MarkdownDocument Document
Markdown document.
override void IncrementStatistics(MarkdownStatistics Statistics)
Increments the property or properties in Statistics corresponding to the element.
Definition: Multimedia.cs:241
MultimediaReference(MarkdownDocument Document, LinkedList< MarkdownElement > ChildElements, string Label, bool AloneInParagraph)
Multimedia reference.
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.
bool AloneInParagraph
If the element is alone in a paragraph.
override bool OutsideParagraph
If element, parsed as a span element, can stand outside of a paragraph if alone in it.
override bool InlineSpanElement
If the element is an inline span element.
override Task Render(IRenderer Output)
Renders the element.
override bool Equals(object obj)
Determines whether the specified object is equal to the current object.
Interface for Markdown renderers.
Definition: IRenderer.cs:12