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

Serves as a wrapper class for the BadgeDAO class, further abstracting actions.
Mostra file Open project: mlcamilli/ActivEarth

Public Methods

Method 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 method

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.
return ActivEarth.Objects.Competition.Badges.Badge

GetFormattedProgress() public static method

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

UpdateBadge() public static method

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.
return int