using Nonemm.Core; namespace Nonemm.Session; /// One field the statistics window can put down the rows or across the columns. /// `Headings` holds two entries for the fields that print two label columns. public sealed class StatisticsField { private readonly Func read; internal StatisticsField(string name, Func read, params string[] headings) { Name = name; this.read = read; Headings = headings.Length > 0 ? headings : [name]; } public string Name { get; } public IReadOnlyList Headings { get; } /// `startUtc` is when the contest started: the five, ten and fifteen minute /// fields count from it. public PivotKey KeyOf(Qso qso, DateTime startUtc) => read(qso, startUtc); public override string ToString() => Name; }