StateSnapshot
public sealed class StateSnapshotNamespace Snitch.Api
A small ordered name->count distribution returned by a state provider.
Example
Profiler.RegisterStateProvider("MyMod.Widgets", () => new StateSnapshot { Title = "Widgets" }.Add("red", red).Add("green", green).Add("blue", blue));Fields
Section titled “Fields”public string TitleThe heading shown above the distribution.
Value Free text, e.g. “Example Widgets”. Null shows the provider id.
public int TotalThe total the buckets are measured against.
Value 0 (the default) uses the sum of all bucket counts.
Buckets
Section titled “Buckets”public readonly List<Bucket> Buckets = new List<Bucket>()Type: Bucket
The buckets in the order they are shown.
Methods
Section titled “Methods”public StateSnapshot Add(string name, int count)Append a bucket.
| Parameter | |
|---|---|
name | The bucket label, e.g. “red”. |
count | How many items fall into the bucket. |
Returns This snapshot, for chaining.
public void Clear()