コード例 #1
0
    public void AddLine(string TraitValue, LogEntry Line)
    {
        var existsInCollection = LineCollections.TryGetValue(TraitValue, out var lc);

        lc ??= new SingleTraitValueEventCollection()
        {
            TraitName  = Name,
            TraitValue = TraitValue,
        };

        lc.Add(Line);

        if (!existsInCollection)
        {
            LineCollections.Add(lc.TraitValue, lc);
        }
    }
コード例 #2
0
 /// <summary>
 /// Lines associated with the given index value
 /// </summary>
 /// <param name="IndexValue"></param>
 /// <returns></returns>
 /// <remarks></remarks>
 public LogEntryCollection <LogEntry> LinesFromTraitValue(string TraitValue)
 {
     LineCollections.TryGetValue(TraitValue, out var lc);
     return(lc ?? new());
 }