mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 09:15:33 +00:00
Further developed collections
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user