DotNet.Ships.Class.CalculationResult 1 - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

EliteDangerousAlmanac / Ships / CalculationResult<T>

Class: CalculationResult<T>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/LoadoutCalculations.cs:82

A build metric, and the evidence for whether it is complete.

Type Parameters

T

The calculated value.

Remarks

An incomplete result never exposes a misleading partial value, so the value is read through TryGetValue or through Value, which refuses an incomplete result rather than answering a default.

Properties

Complete

Complete: bool

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/LoadoutCalculations.cs:94

Whether the calculation produced a value.

Issues

Issues: IReadOnlyList<CalculationIssue>

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/LoadoutCalculations.cs:97

The missing or unavailable inputs. A complete result names none.

Value

Value: T

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/LoadoutCalculations.cs:103

The calculated value.

Exceptions

InvalidOperationException

The calculation is incomplete. Read Issues to say why.

Methods

TryGetValue()

TryGetValue(value): bool

Defined in: dotnet/src/EliteDangerousAlmanac/Ships/LoadoutCalculations.cs:110

Reads the value, when the calculation is complete.

Parameters

value

out T

The calculated value, or the type's default when it is not.

Returns

bool

true when the calculation is complete.

⚠️ **GitHub.com Fallback** ⚠️