C# Class ActivEarth.Server.Service.Statistics.StatisticManager

Serves as a wrapper class for the StatisticDAO class, further abstracting actions.
Afficher le fichier Open project: mlcamilli/ActivEarth Class Usage Examples

Méthodes publiques

Méthode Description
GetUserStatistic ( Statistic statToGet ) : UserStatistic

Gets a statistic for a user based on the statistic type.

GetUserStatistic ( int id ) : UserStatistic

Returns a User's Statistic based on its ID.

SetUserStatistic ( Statistic statToSet, float val ) : void
SetUserStatistic ( int userId, Statistic statistic, float value ) : void

Sets the value of a statistic for a specific user.

StatisticManager ( User user ) : System
UpdateUserStatistics ( ) : void

Method Details

GetUserStatistic() public méthode

Gets a statistic for a user based on the statistic type.
public GetUserStatistic ( Statistic statToGet ) : UserStatistic
statToGet Statistic Statistic to retrieve.
Résultat ActivEarth.Objects.Profile.UserStatistic

GetUserStatistic() public méthode

Returns a User's Statistic based on its ID.
public GetUserStatistic ( int id ) : UserStatistic
id int The ID of the UserStatistic to get.
Résultat ActivEarth.Objects.Profile.UserStatistic

SetUserStatistic() public méthode

public SetUserStatistic ( Statistic statToSet, float val ) : void
statToSet Statistic
val float
Résultat void

SetUserStatistic() public static méthode

Sets the value of a statistic for a specific user.
public static SetUserStatistic ( int userId, Statistic statistic, float value ) : void
userId int ID of the user to update.
statistic Statistic Statistic to be updated.
value float New value for the statistic.
Résultat void

StatisticManager() public méthode

public StatisticManager ( User user ) : System
user ActivEarth.Objects.Profile.User
Résultat System

UpdateUserStatistics() public méthode

public UpdateUserStatistics ( ) : void
Résultat void