1using System.Threading.Tasks;
12 private readonly
string source;
14 private string firstText =
null;
15 private int nrDocuments = 0;
16 private readonly
bool isDefault;
44 if (!(this.firstText is
null))
45 return this.firstText;
53 return this.firstText;
65 if (this.documents.Count == 0)
68 return this.documents[0];
82 return this.documents.ToArray();
99 this.documents.Add(Info);
102 if (this.nrDocuments == 1)
103 this.type = Info.
Type;
119 if (
string.IsNullOrEmpty(Id))
120 return await this.
Add(Markdown, Id);
126 lock (this.documents)
128 c = this.documents.Count;
129 for (i = 0; i < c; i++)
131 Info2 = this.documents[i];
134 this.documents[i] = Info;
136 if (this.nrDocuments == 1)
137 this.type = Info.
Type;
143 this.documents.Add(Info);
146 if (this.nrDocuments == 1)
147 this.type = Info.
Type;
Information about a document.
DocumentType Type
Document type.
MarkdownDocument Markdown
Markdown document.
static async Task< DocumentInformation > CreateAsync(MarkdownDocument Markdown, string Id)
Information about a document.
Maintains the state of one source.
DocumentInformation[] Documents
Available documents from source.
SourceState(string Source, bool IsDefault)
Maintains the state of one source.
async Task< string > GetFirstText()
First document text.
DocumentInformation FirstDocument
First document.
async Task< DocumentType > Add(MarkdownDocument Markdown, string Id)
Adds a markdown document from the source.
async Task< DocumentType > Update(MarkdownDocument Markdown, string Id)
Updates a markdown document from the source. If not found, it is added.
bool IsDefault
If the content is default content (true), or reported content (false).
Contains a markdown document. This markdown document class supports original markdown,...
Task< string > GenerateMarkdown()
Generates Markdown from the markdown text.
A chunked list is a linked list of chunks of objects of type T .
DocumentType
Type of markdown document.