# RunScoreAggregate

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.runscoreaggregate/
> Summary: RunScoreAggregate: One aggregated group: every score sharing a breakdown key AND a RunScoreKind.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

One aggregated group: every score sharing a breakdown key AND a
[RunScoreKind](/api/tracon.runscorekind/).

```csharp
public sealed record RunScoreAggregate : IEquatable<RunScoreAggregate>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.runscoreaggregate/">RunScoreAggregate</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;RunScoreAggregate&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

The key is deliberately compound. Two different [RunScoreKind](/api/tracon.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](/api/tracon.runscorekind/) it was actually written
with.

## Constructors

### <a id="Tracon_RunScoreAggregate__ctor"></a> RunScoreAggregate\(\)

```csharp
public RunScoreAggregate()
```

## Properties

### <a id="Tracon_RunScoreAggregate_Average"></a> Average

The average value. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for
[RunScoreKind.Categorical](/api/tracon.runscorekind/), or when every score in the group
carries no value.

```csharp
public double? Average { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_RunScoreAggregate_Categories"></a> Categories

Count per category (`TextValue`), highest count
first. Populated only on [RunScoreSummary.ByName](/api/tracon.runscoresummary/#Tracon_RunScoreSummary_ByName) entries
whose [RunScoreAggregate.Kind](/api/tracon.runscoreaggregate/#Tracon_RunScoreAggregate_Kind) is [RunScoreKind.Categorical](/api/tracon.runscorekind/); every
other group carries an empty map.

```csharp
public IReadOnlyDictionary<string, long> Categories { get; init; }
```

#### Property Value

 [IReadOnlyDictionary](https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary\-2)<[string](https://learn.microsoft.com/dotnet/api/system.string), [long](https://learn.microsoft.com/dotnet/api/system.int64)\>

### <a id="Tracon_RunScoreAggregate_Count"></a> Count

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

```csharp
public required long Count { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_RunScoreAggregate_Key"></a> Key

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

```csharp
public required string Key { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_RunScoreAggregate_Kind"></a> Kind

The shape every score in this group shares.

```csharp
public required RunScoreKind Kind { get; init; }
```

#### Property Value

 [RunScoreKind](/api/tracon.runscorekind/)

### <a id="Tracon_RunScoreAggregate_Maximum"></a> Maximum

The largest value. Same null rule as `Average`.

```csharp
public double? Maximum { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_RunScoreAggregate_Minimum"></a> Minimum

The smallest value. Same null rule as `Average`.

```csharp
public double? Minimum { get; init; }
```

#### Property Value

 [double](https://learn.microsoft.com/dotnet/api/system.double)?

### <a id="Tracon_RunScoreAggregate_NoValueCount"></a> NoValueCount

The number of scores in the group carrying no value
(`Value` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null)). A
[RunScoreKind.Categorical](/api/tracon.runscorekind/) score always carries no value, so
for that kind this equals `Count`. Never counted into
`Average`.

```csharp
public long NoValueCount { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_RunScoreAggregate_TruncatedCategoryCount"></a> TruncatedCategoryCount

The number of distinct categories that did not fit inside
[RunScoreAggregate.Categories](/api/tracon.runscoreaggregate/#Tracon_RunScoreAggregate_Categories) because `MaxRows` ([RunScoreQuery](/api/tracon.runscorequery/)) was
reached. Zero when nothing was cut. Reported instead of silently
dropping categories, which would read as "these categories do not exist".

```csharp
public long TruncatedCategoryCount { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

## Methods

### <a id="Tracon_RunScoreAggregate_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScoreAggregate_Equals_Tracon_RunScoreAggregate_"></a> Equals\(RunScoreAggregate?\)

```csharp
public bool Equals(RunScoreAggregate? other)
```

#### Parameters

`other` [RunScoreAggregate](/api/tracon.runscoreaggregate/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScoreAggregate_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_RunScoreAggregate_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_RunScoreAggregate_op_Equality_Tracon_RunScoreAggregate_Tracon_RunScoreAggregate_"></a> operator ==\(RunScoreAggregate?, RunScoreAggregate?\)

```csharp
public static bool operator ==(RunScoreAggregate? left, RunScoreAggregate? right)
```

#### Parameters

`left` [RunScoreAggregate](/api/tracon.runscoreaggregate/)?

`right` [RunScoreAggregate](/api/tracon.runscoreaggregate/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_RunScoreAggregate_op_Inequality_Tracon_RunScoreAggregate_Tracon_RunScoreAggregate_"></a> operator \!=\(RunScoreAggregate?, RunScoreAggregate?\)

```csharp
public static bool operator !=(RunScoreAggregate? left, RunScoreAggregate? right)
```

#### Parameters

`left` [RunScoreAggregate](/api/tracon.runscoreaggregate/)?

`right` [RunScoreAggregate](/api/tracon.runscoreaggregate/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
