Added support for AppDefs; Updated currend XML

This commit is contained in:
Simon Martens
2022-11-25 20:05:29 +01:00
parent 02abfb111a
commit ccfcadb91b
22 changed files with 526633 additions and 79611 deletions

View File

@@ -0,0 +1,16 @@
namespace HaDocument.Models {
public class App {
public string Index { get; } = "";
public string Name { get; } = "";
public bool Category { get; } = false;
public App(
string index,
string name,
bool category
) {
Index = index;
Name = name;
}
}
}

View File

@@ -16,6 +16,7 @@ namespace HaDocument.Models
public Dictionary<string, Comment> Comments;
public Dictionary<string, List<Backlink>> Backlinks;
public Dictionary<string, List<Hand>> Hands;
public Dictionary<string, App> Apps;
// Helper Library for precalculationg the Structure of the Document:
public Dictionary<string, Dictionary<string, HashSet<string>>> LetterPageLines;
@@ -63,6 +64,7 @@ namespace HaDocument.Models
Backlinks,
Hands,
Structure,
Apps,
options
);
}

View File

@@ -18,6 +18,7 @@ namespace HaDocument.Models
public ImmutableDictionary<string, Location> Locations { get; }
public ImmutableDictionary<string, Letter> Letters { get; }
public ImmutableDictionary<string, Person> HandPersons { get; }
public ImmutableDictionary<string, App> Apps { get; }
public ImmutableDictionary<string, Editreason> Editreasons { get; }
public ImmutableDictionary<string, Comment> Comments { get; }
public ImmutableDictionary<string, ImmutableList<Backlink>> Backlinks { get; }
@@ -56,6 +57,7 @@ namespace HaDocument.Models
Dictionary<string, List<Backlink>> backlinks,
Dictionary<string, List<Hand>> hands,
Dictionary<string, Dictionary<string, Dictionary<string, string>>> Structure,
Dictionary<string, App> apps,
IHaDocumentOptions options
)
{
@@ -69,6 +71,7 @@ namespace HaDocument.Models
HandPersons = ImmutableDictionary.ToImmutableDictionary(handPersons);
Editreasons = ImmutableDictionary.ToImmutableDictionary(editReasons);
Comments = ImmutableDictionary.ToImmutableDictionary(comments);
Apps = ImmutableDictionary.ToImmutableDictionary(apps);
var backbuilder = ImmutableDictionary.CreateBuilder<string, ImmutableList<Backlink>>();
foreach (var entry in backlinks)