Class Stat<TAction>
- Namespace
- Ecng.ComponentModel
- Assembly
- Ecng.ComponentModel.dll
Provides statistical tracking for actions.
public class Stat<TAction>
Type Parameters
TAction
The type representing the action.
- Inheritance
-
Stat<TAction>
- Inherited Members
- Extension Methods
Constructors
Stat()
public Stat()
Properties
FreqLimit
Gets or sets the maximum number of frequency records to keep.
public int FreqLimit { get; set; }
Property Value
LongestLimit
Gets or sets the maximum number of longest duration records to keep.
public int LongestLimit { get; set; }
Property Value
Methods
Begin(TAction, IPAddress)
Starts tracking an action.
public Stat<TAction>.Item Begin(TAction action, IPAddress address)
Parameters
action
TActionThe action to track.
address
IPAddressThe IP address associated with the action.
Returns
- Stat<TAction>.Item
An Stat<TAction>.Item that represents the action tracking session.
Exceptions
- ArgumentNullException
Thrown when action or address is null.
Clear()
Clears all the recorded statistics.
public void Clear()
GetInfo(int, int)
Retrieves statistical information with support for paging.
public StatInfo<TAction> GetInfo(int skip, int take)
Parameters
Returns
- StatInfo<TAction>
A StatInfo<TAction> structure containing the current statistics.