Indexnumber parsing disabled

This commit is contained in:
Simon Martens
2023-09-16 15:43:11 +02:00
parent f054c8913d
commit d86d508786
58 changed files with 447 additions and 297 deletions

View File

@@ -6,29 +6,29 @@ using HaWeb.XMLParser;
using System.Xml.Linq;
public class CollectedItem : ISearchable {
public string Index { get; private set; }
public string ID { get; private set; }
public string? SearchText { get; private set; }
public IDictionary<string, string>? Fields { get; private set; }
public XElement ELement { get; private set; }
public XElement Element { get; private set; }
public IXMLCollection Collection { get; private set; }
public IDictionary<string, CollectedItem>? Items { get; set; }
public CollectedItem(
string index,
string id,
XElement element,
IXMLCollection collection,
IDictionary<string, string>? fields,
string? searchtext = null
) {
this.Index = index;
this.ID = id;
this.SearchText = searchtext;
this.Collection = collection;
this.ELement = element;
this.Fields = fields;
this.Element = element;
}
public string? this[string v] {
get {
if (Fields == null && Collection.GenerateDataFields != null)
Fields = Collection.GenerateDataFields(this.Element);
if (Fields != null && Fields.ContainsKey(v))
return Fields[v];
return null;