Open
Description
I'm confused by this description of IColumn.GetValue():
BenchmarkDotNet/src/BenchmarkDotNet/Columns/IColumn.cs
Lines 19 to 27 in 9378651
Now my reading would be to implement this as:
public string GetValue(Summary summary, BenchmarkCase benchmarkCase) => GetValue(summary, benchmarkCase, summary.Style);
public string GetValue(Summary summary, BenchmarkCase benchmarkCase, SummaryStyle style) => ValueWithStyle(style);
But most actual implementations do it the other way around:
public string GetValue(Summary summary, BenchmarkCase benchmarkCase)
{
if (someColumn)
{
// Some use the maybe user-defined style of the summary or don't need one
return ValueWithStyle(summary.Style);
}
else
{
// Others ignore any user-defined style and use the predefined default
return ValueWithStyle(SummaryStyle.Default);
}
}
// While this overload in most cases ignores the explicit style parameter
public string GetValue(Summary summary, BenchmarkCase benchmarkCase, SummaryStyle style) => GetValue(summary, benchmarkCase);
So what am I missing here?