Skip to content
Tracon

RunScoreAggregate

Namespace Tracon · Assembly Tracon.Abstractions.dll

One aggregated group: every score sharing a breakdown key AND a RunScoreKind.

public sealed record RunScoreAggregate : IEquatable<RunScoreAggregate>

objectRunScoreAggregate

IEquatable<RunScoreAggregate>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The key is deliberately compound. Two different RunScoreKind values never share a group — averaging a 1-5 star rating together with a 0-100 numeric score under the same name would be meaningless. This means the same score name (or author, source, agent) can appear more than once in a breakdown list: once per RunScoreKind it was actually written with.

public RunScoreAggregate()

The average value. null for RunScoreKind.Categorical, or when every score in the group carries no value.

public double? Average { get; init; }

double?

Count per category (TextValue), highest count first. Populated only on RunScoreSummary.ByName entries whose RunScoreAggregate.Kind is RunScoreKind.Categorical; every other group carries an empty map.

public IReadOnlyDictionary<string, long> Categories { get; init; }

IReadOnlyDictionary<string, long>

The number of scores in the group, INCLUDING those carrying no value.

public required long Count { get; init; }

long

The breakdown key: a score name, an author, a source, or an agent name, depending on which list this entry is in.

public required string Key { get; init; }

string

The shape every score in this group shares.

public required RunScoreKind Kind { get; init; }

RunScoreKind

The largest value. Same null rule as Average.

public double? Maximum { get; init; }

double?

The smallest value. Same null rule as Average.

public double? Minimum { get; init; }

double?

The number of scores in the group carrying no value (Value is null). A RunScoreKind.Categorical score always carries no value, so for that kind this equals Count. Never counted into Average.

public long NoValueCount { get; init; }

long

The number of distinct categories that did not fit inside RunScoreAggregate.Categories because MaxRows (RunScoreQuery) was reached. Zero when nothing was cut. Reported instead of silently dropping categories, which would read as “these categories do not exist”.

public long TruncatedCategoryCount { get; init; }

long

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(RunScoreAggregate? other)

other RunScoreAggregate?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(RunScoreAggregate?, RunScoreAggregate?)

Section titled “ operator ==(RunScoreAggregate?, RunScoreAggregate?)”
public static bool operator ==(RunScoreAggregate? left, RunScoreAggregate? right)

left RunScoreAggregate?

right RunScoreAggregate?

bool

operator !=(RunScoreAggregate?, RunScoreAggregate?)

Section titled “ operator !=(RunScoreAggregate?, RunScoreAggregate?)”
public static bool operator !=(RunScoreAggregate? left, RunScoreAggregate? right)

left RunScoreAggregate?

right RunScoreAggregate?

bool