Class LossEstimate
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:
-
Never report
0when the answer is unknown. Unknown with a bound is honest; zero is a claim. Use BoundedMin/BoundedMax and leave EntityCount at-1. - Enumerate when enumeration is possible. A count of zero and a count that was never taken must not be indistinguishable.
-
Loss is measured in user terms, not storage terms. "Page 41,208 is unrecoverable" is not a loss report;
"12
Playerentities lose theirInventoryvalues, 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
Properties
Archetype
Archetype the loss falls in, when resolvable.
public string Archetype { get; init; }
Property Value
BoundedMax
Upper bound on affected entities when EntityCount is -1.
public long BoundedMax { get; init; }
Property Value
BoundedMin
Lower bound on affected entities when EntityCount is -1.
public long BoundedMin { get; init; }
Property Value
Component
Component the loss falls in, when resolvable.
public string Component { get; init; }
Property Value
CountText
Renders the count as text: an exact number, or an honest range.
public string CountText { get; }
Property Value
EntityCount
Exact number of entities affected when enumerable; -1 when only a bound is known.
public long EntityCount { get; init; }
Property Value
Explanation
Plain-English statement of what the user no longer has.
public string Explanation { get; init; }
Property Value
IsNone
Whether this estimate represents any loss at all.
public bool IsNone { get; }
Property Value
Kind
What unit the loss is measured in.
public LossKind Kind { get; init; }
Property Value
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; }