Vereinsmeisterschaften  22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
Loading...
Searching...
No Matches
AnalyticsModuleCompetitionTimes.cs
4
6{
11 {
12 #region Model
14 {
15 public byte Age { get; set; }
16 public TimeSpan Time { get; set; }
17 public bool IsTimeFromRudolphTable { get; set; }
18 public bool IsTimeInterpolatedFromRudolphTable { get; set; }
19 public bool IsOpenAgeTimeFromRudolphTable { get; set; }
20 }
21 #endregion
22
23 private ICompetitionService _competitionService;
24
30 {
31 _competitionService = competitionService;
32 }
33
35 public bool AnalyticsAvailable => _competitionService.CompetitionCount > 0;
36
43 public List<ModelCompetitionTimes> GetCompetitionTimesPerAge(Genders gender, SwimmingStyles swimmingStyle)
44 => _competitionService.GetCompetitions()
45 .Where(c => c.Gender == gender && c.SwimmingStyle == swimmingStyle)
46 .OrderBy(c => c.Age)
47 .Select(c => new ModelCompetitionTimes()
48 {
49 Age = c.Age,
50 Time = c.BestTime,
51 IsTimeFromRudolphTable = c.IsTimeFromRudolphTable,
52 IsTimeInterpolatedFromRudolphTable = c.IsTimeInterpolatedFromRudolphTable,
53 IsOpenAgeTimeFromRudolphTable = c.IsOpenAgeTimeFromRudolphTable
54 }
55 ).ToList();
56
59
61 public List<string> SupportedDocumentPlaceholderKeys => null;
62 }
63}
DocXPlaceholderHelper.TextPlaceholders CollectDocumentPlaceholderContents()
Collect the values for all document placeholders that are supported by this IAnalyticsModule....
List< string > SupportedDocumentPlaceholderKeys
List of all document placeholder keys that are supported by this analytics module....
List< ModelCompetitionTimes > GetCompetitionTimesPerAge(Genders gender, SwimmingStyles swimmingStyle)
List with ModelCompetitionTimes for the requested gender and style.
AnalyticsModuleCompetitionTimes(ICompetitionService competitionService)
Constructor for the AnalyticsModuleCompetitionTimes
Interface for a service used to get and store a list of objects.
SwimmingStyles
Available swimming styles.
Genders
Available genders for a person.
Definition Genders.cs:7