Skip to main content

IndexedStatisticList<TStatistic, TStatType>

An abstract class in Root.Township, Alta.Profiling.Networking.

Base for network profiling lists that give each statistic type (such as a message type) a fixed index in the list.

Constructors​

MemberWhat it is
protected IndexedStatisticList()Creates an IndexedStatisticList with default values.

Fields​

MemberWhat it is
protected static Dictionary<TStatType, int> typeIndexesStatic map from statistic type to its list index, shared by all instances with the same type arguments.

Methods​

MemberWhat it is
protected abstract TStatistic CreateNewStatistic(TStatType creationArgument)Makes a new statistic for a type the first time it is seen.
protected void EnsureStatisticTypeIndexExists(TStatType statType)Gives the type an index if it has none and makes sure a statistic exists at that index.