Struct ScoreRecord
Aggregated statistics for a single score metric (top, max, min, average).
Immutable value object used for persistence and leaderboard purposes.
Assembly: Serenity.Score.Domain.dll
Syntax
public readonly struct ScoreRecord : IEquatable<ScoreRecord>
Constructors
ScoreRecord(ScoreKey, float, float, float, int)
Creates a new ScoreRecord with the specified statistics.
Declaration
public ScoreRecord(ScoreKey key, float best, float worst, float average, int sessionCount)
Parameters
| Type |
Name |
Description |
| ScoreKey |
key |
The metric key.
|
| float |
best |
The best recorded value.
|
| float |
worst |
The worst recorded value.
|
| float |
average |
The average value.
|
| int |
sessionCount |
The number of recorded sessions.
|
Fields
Average
The average value across all recorded sessions.
Declaration
public readonly float Average
Field Value
Best
The best (highest) value ever recorded for this metric.
Declaration
public readonly float Best
Field Value
Key
The metric key this record belongs to.
Declaration
public readonly ScoreKey Key
Field Value
SessionCount
The number of sessions recorded.
Declaration
public readonly int SessionCount
Field Value
Worst
The lowest value ever recorded for this metric.
Declaration
public readonly float Worst
Field Value
Methods
Equals(ScoreRecord)
Declaration
public bool Equals(ScoreRecord other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(ScoreRecord, ScoreRecord)
Declaration
public static bool operator ==(ScoreRecord left, ScoreRecord right)
Parameters
Returns
operator !=(ScoreRecord, ScoreRecord)
Declaration
public static bool operator !=(ScoreRecord left, ScoreRecord right)
Parameters
Returns
Implements