Table of Contents

Class LossEstimate

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

What a repair would cost, in user terms.

public sealed class LossEstimate
Inheritance
LossEstimate
Inherited Members

Remarks

Three rules govern this type, and each exists because its violation is a specific way of lying:

  1. Never report 0 when the answer is unknown. Unknown with a bound is honest; zero is a claim. Use BoundedMin/BoundedMax and leave EntityCount at -1.
  2. Enumerate when enumeration is possible. A count of zero and a count that was never taken must not be indistinguishable.
  3. Loss is measured in user terms, not storage terms. "Page 41,208 is unrecoverable" is not a loss report; "12 Player entities lose their Inventory values, the entities survive" is.

Constructors

LossEstimate()

public LossEstimate()

Fields

None

A shared, allocation-free "nothing is lost" instance.

public static readonly LossEstimate None

Field Value

LossEstimate

Properties

Archetype

Archetype the loss falls in, when resolvable.

public string Archetype { get; init; }

Property Value

string

BoundedMax

Upper bound on affected entities when EntityCount is -1.

public long BoundedMax { get; init; }

Property Value

long

BoundedMin

Lower bound on affected entities when EntityCount is -1.

public long BoundedMin { get; init; }

Property Value

long

Component

Component the loss falls in, when resolvable.

public string Component { get; init; }

Property Value

string

CountText

Renders the count as text: an exact number, or an honest range.

public string CountText { get; }

Property Value

string

EntityCount

Exact number of entities affected when enumerable; -1 when only a bound is known.

public long EntityCount { get; init; }

Property Value

long

Explanation

Plain-English statement of what the user no longer has.

public string Explanation { get; init; }

Property Value

string

IsNone

Whether this estimate represents any loss at all.

public bool IsNone { get; }

Property Value

bool

Kind

What unit the loss is measured in.

public LossKind Kind { get; init; }

Property Value

LossKind

Sample

Affected entity ids, capped for report size. The complete set goes to the loss manifest file, never here.

public IReadOnlyList<ulong> Sample { get; init; }

Property Value

IReadOnlyList<ulong>