C# Класс ActivEarth.DAO.ContestDAO

Показать файл Открыть проект

Открытые методы

Метод Описание
CalculateBracketRewards ( Contest contest ) : List

Calculates the ActivityScore reward that will be awarded to teams in each bracket.

CalculateBracketRewards ( int contestId ) : List

Calculates the ActivityScore reward that will be awarded to teams in each bracket.

CalculateBracketSizes ( int teamCount ) : List

Calculates the number of teams qualifying for each reward bracket in a contest.

CreateNewContest ( Contest contest ) : int

Saves a contest as a new entry in the DB.

FindContests ( string name, bool exactMatch ) : List

Gets the list of currently joinable contests with a search query (searching contests by name).

GetActiveContests ( bool loadTeams, bool loadTeamMembers ) : List

Retrieves all active contests in the DB.

GetAllContests ( ) : IEnumerable
GetContestFromContestId ( int contestId, bool loadTeams, bool loadTeamMembers ) : Contest

Retrieves a Contest from the DB based on its ID.

GetContestIdsFromGroupId ( int groupId ) : List

Returns the list of IDs of all contests that a group is currently participating in.

GetContestIdsFromUserId ( int userId ) : List

Returns the list of IDs of all contests that a user is currently participating in.

GetContestNameFromContestId ( int contestId ) : string

Returns the name of a contest based on its ID.

GetStatisticFromContestId ( int contestId ) : Statistic

Lookup for the statistic being tracked by a specific challenge.

RemoveContestFromContestId ( int contestId ) : bool

Deletes an existing Contest from the DB.

RemoveOldContests ( ) : bool

Removes contests from the DB that have were deactivated more than two weeks ago.

UpdateContest ( Contest contest ) : bool

Updates an existing Contest in the DB.

UpdateContestStandings ( int contestId ) : void

Updates the scores and bracket assignments for all teams in the contest.

Описание методов

CalculateBracketRewards() публичный статический Метод

Calculates the ActivityScore reward that will be awarded to teams in each bracket.
public static CalculateBracketRewards ( Contest contest ) : List
contest ActivEarth.Objects.Competition.Contests.Contest Contest to calculate rewards for. Must have teams loaded.
Результат List

CalculateBracketRewards() публичный статический Метод

Calculates the ActivityScore reward that will be awarded to teams in each bracket.
public static CalculateBracketRewards ( int contestId ) : List
contestId int
Результат List

CalculateBracketSizes() публичный статический Метод

Calculates the number of teams qualifying for each reward bracket in a contest.
public static CalculateBracketSizes ( int teamCount ) : List
teamCount int Number of teams in the contest.
Результат List

CreateNewContest() публичный статический Метод

Saves a contest as a new entry in the DB.
public static CreateNewContest ( Contest contest ) : int
contest ActivEarth.Objects.Competition.Contests.Contest Contest object to add to the DB.
Результат int

FindContests() публичный статический Метод

Gets the list of currently joinable contests with a search query (searching contests by name).
public static FindContests ( string name, bool exactMatch ) : List
name string
exactMatch bool
Результат List

GetActiveContests() публичный статический Метод

Retrieves all active contests in the DB.
public static GetActiveContests ( bool loadTeams, bool loadTeamMembers ) : List
loadTeams bool
loadTeamMembers bool
Результат List

GetAllContests() публичный статический Метод

public static GetAllContests ( ) : IEnumerable
Результат IEnumerable

GetContestFromContestId() публичный статический Метод

Retrieves a Contest from the DB based on its ID.
public static GetContestFromContestId ( int contestId, bool loadTeams, bool loadTeamMembers ) : Contest
contestId int Identifier of the contest to retrieve.
loadTeams bool
loadTeamMembers bool
Результат ActivEarth.Objects.Competition.Contests.Contest

GetContestIdsFromGroupId() публичный статический Метод

Returns the list of IDs of all contests that a group is currently participating in.
public static GetContestIdsFromGroupId ( int groupId ) : List
groupId int ID of the group to search for.
Результат List

GetContestIdsFromUserId() публичный статический Метод

Returns the list of IDs of all contests that a user is currently participating in.
public static GetContestIdsFromUserId ( int userId ) : List
userId int ID of the user to search for.
Результат List

GetContestNameFromContestId() публичный статический Метод

Returns the name of a contest based on its ID.
public static GetContestNameFromContestId ( int contestId ) : string
contestId int
Результат string

GetStatisticFromContestId() публичный статический Метод

Lookup for the statistic being tracked by a specific challenge.
public static GetStatisticFromContestId ( int contestId ) : Statistic
contestId int ID of the contest to query.
Результат Statistic

RemoveContestFromContestId() публичный статический Метод

Deletes an existing Contest from the DB.
public static RemoveContestFromContestId ( int contestId ) : bool
contestId int ID for the Contest whose record needs to be removed.
Результат bool

RemoveOldContests() публичный статический Метод

Removes contests from the DB that have were deactivated more than two weeks ago.
public static RemoveOldContests ( ) : bool
Результат bool

UpdateContest() публичный статический Метод

Updates an existing Contest in the DB.
public static UpdateContest ( Contest contest ) : bool
contest ActivEarth.Objects.Competition.Contests.Contest Contest whose record needs updating.
Результат bool

UpdateContestStandings() публичный статический Метод

Updates the scores and bracket assignments for all teams in the contest.
public static UpdateContestStandings ( int contestId ) : void
contestId int Contest ID to update.
Результат void