Interface IStats
Assembly: Eco.Stats.dll
Syntax
Methods
AddIndex(String, String)
Declaration
void AddIndex(string collection, string propName)
Parameters
| Type |
Name |
Description |
| System.String |
collection |
|
| System.String |
propName |
|
AddIndex(Type, String)
Declaration
void AddIndex(Type type, string propName)
Parameters
| Type |
Name |
Description |
| System.Type |
type |
|
| System.String |
propName |
|
CountStat(String, Single, Double, Int32)
Returns sum of 'count' values of stat values stored in db based on ActionName
Declaration
float CountStat(string stat, float time, double withinSeconds, int userID)
Parameters
| Type |
Name |
Description |
| System.String |
stat |
|
| System.Single |
time |
|
| System.Double |
withinSeconds |
|
| System.Int32 |
userID |
|
Returns
| Type |
Description |
| System.Single |
|
Exceptions
| Type |
Condition |
| System.OverflowException |
Thrown when sum is too large or to small.
|
CountStat(Type, Single, Double, Int32)
Returns sum of stat values stored in db based on stat type
Declaration
float CountStat(Type stat, float time, double withinSeconds, int userID)
Parameters
| Type |
Name |
Description |
| System.Type |
stat |
|
| System.Single |
time |
|
| System.Double |
withinSeconds |
|
| System.Int32 |
userID |
|
Returns
| Type |
Description |
| System.Single |
|
CountStatPerPlayer(String, Single, Double)
Returns sum of stat values stored in db per user. You can use it instead of CountStat when you work at all users same time, by example, when you evaulting demographic criteria for all useres. It uses action name
Declaration
Dictionary<int, float> CountStatPerPlayer(string stat, float time, double withinSeconds)
Parameters
| Type |
Name |
Description |
| System.String |
stat |
|
| System.Single |
time |
|
| System.Double |
withinSeconds |
|
Returns
| Type |
Description |
| System.Collections.Generic.Dictionary<System.Int32, System.Single> |
|
CountStatPerPlayer(Type, Single, Double)
Returns sum of stat values stored in db per user. You can use it instead of CountStat when you work at all users same time, by example, when you evaulting demographic criteria for all useres. It uses type of stat
Declaration
Dictionary<int, float> CountStatPerPlayer(Type stat, float time, double withinSeconds)
Parameters
| Type |
Name |
Description |
| System.Type |
stat |
|
| System.Single |
time |
|
| System.Double |
withinSeconds |
|
Returns
| Type |
Description |
| System.Collections.Generic.Dictionary<System.Int32, System.Single> |
|
DeltaValue(String, Int32)
Declaration
float DeltaValue(string collection, int time)
Parameters
| Type |
Name |
Description |
| System.String |
collection |
|
| System.Int32 |
time |
|
Returns
| Type |
Description |
| System.Single |
|
Flush()
Declaration
MostRecentValue(String)
Declaration
float MostRecentValue(string collection)
Parameters
| Type |
Name |
Description |
| System.String |
collection |
|
Returns
| Type |
Description |
| System.Single |
|
QueryCollection<T>(String)
Declaration
List<T> QueryCollection<T>(string collectionName)
Parameters
| Type |
Name |
Description |
| System.String |
collectionName |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<T> |
|
Type Parameters
QueryFirstBefore(String, Int32)
Declaration
TimeValue QueryFirstBefore(string collectionName, int time)
Parameters
| Type |
Name |
Description |
| System.String |
collectionName |
|
| System.Int32 |
time |
|
Returns
QueryNeighbors(String, Int32)
Declaration
List<TimeValue> QueryNeighbors(string collectionName, int second)
Parameters
| Type |
Name |
Description |
| System.String |
collectionName |
|
| System.Int32 |
second |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<TimeValue> |
|
QueryRangeGeneric(StatInfo, Int32, Int32)
Declaration
IEnumerable<BsonDocument> QueryRangeGeneric(StatInfo info, int startingSecond, int endingSecond)
Parameters
| Type |
Name |
Description |
| StatInfo |
info |
|
| System.Int32 |
startingSecond |
|
| System.Int32 |
endingSecond |
|
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerable<LiteDB.BsonDocument> |
|
QueryTimeValueRange(String, Int32, Int32)
Declaration
List<TimeValue> QueryTimeValueRange(string collectionName, int startingSecond, int endingSecond)
Parameters
| Type |
Name |
Description |
| System.String |
collectionName |
|
| System.Int32 |
startingSecond |
|
| System.Int32 |
endingSecond |
|
Returns
| Type |
Description |
| System.Collections.Generic.List<TimeValue> |
|
Record(IStat)
Declaration
Parameters
| Type |
Name |
Description |
| IStat |
obj |
|
Record(Int32, String, Single)
Declaration
void Record(int time, string collection, float value)
Parameters
| Type |
Name |
Description |
| System.Int32 |
time |
|
| System.String |
collection |
|
| System.Single |
value |
|
RecordBulk(IEnumerable<IStat>)
Declaration
void RecordBulk(IEnumerable<IStat> objs)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.IEnumerable<IStat> |
objs |
|
RecordCustom(String, Int32, Single, Int32, Nullable<Single>)
Declaration
void RecordCustom(string name, int time, float count, int userId, Nullable<float> value)
Parameters
| Type |
Name |
Description |
| System.String |
name |
|
| System.Int32 |
time |
|
| System.Single |
count |
|
| System.Int32 |
userId |
|
| System.Nullable<System.Single> |
value |
|