Further developed collections

This commit is contained in:
schnulller
2022-06-27 02:16:20 +02:00
parent 0fa0ff6a88
commit abe473e9d5
12 changed files with 84 additions and 111 deletions

View File

@@ -11,6 +11,7 @@ public class CollectedItem : ISearchable {
public IDictionary<string, string>? Fields { 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,

View File

@@ -39,4 +39,12 @@ public class ItemsCollection {
if (Collection.SortingsGeneration != null && this.Items.Any())
this.Sortings = Collection.SortingsGeneration(this.Items.Values.ToList());
}
public CollectedItem? this[string v] {
get {
if (Items != null && Items.ContainsKey(v))
return Items[v];
return null;
}
}
}