C# Class ActivEarth.Server.Service.Competition.BadgeManager

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

Méthodes publiques

Méthode Description
CreateBadge ( int userId, Statistic statistic ) : Badge

Creates a new Badge and adds it to the collection.

GetFormattedProgress ( int badgeId ) : string

Returns the formatted text progress report for the Badge (e.g., "34.5 / 40.0").

UpdateBadge ( int userId, Statistic statistic ) : int

Updates the badge to reflect a change in statistics.

Method Details

CreateBadge() public static méthode

Creates a new Badge and adds it to the collection.
public static CreateBadge ( int userId, Statistic statistic ) : Badge
userId int
statistic Statistic Statistic being tracked by the badge.
Résultat ActivEarth.Objects.Competition.Badges.Badge

GetFormattedProgress() public static méthode

Returns the formatted text progress report for the Badge (e.g., "34.5 / 40.0").
public static GetFormattedProgress ( int badgeId ) : string
badgeId int
Résultat string

UpdateBadge() public static méthode

Updates the badge to reflect a change in statistics.
public static UpdateBadge ( int userId, Statistic statistic ) : int
userId int User to update.
statistic Statistic Statistic tracked by the badge to be updated.
Résultat int