ActivEarth.Objects.Competition.Contests.Contest.GetContestState C# (CSharp) Method

GetContestState() public method

Evaluates the current status of the contest.
public GetContestState ( ) : string
return string
        public string GetContestState()
        {
            if (StartTime > DateTime.Now)
            {
                return "SIGN-UP";
            }

            if (Mode == ContestEndMode.GoalBased && Teams.Count != 0 && this.EndValue > Teams[0].Score)
            {
                return "STARTED";
            }

            if (Mode == ContestEndMode.TimeBased && this.EndTime > DateTime.Now)
            {
                return "STARTED";
            }

            return "FINISHED";
        }