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
AnalyticsModuleStartsCounters.cs
4
6{
11 {
12 private IPersonService _personService;
13
19 {
20 _personService = personService;
21 }
22
24 public bool AnalyticsAvailable => true;
25
29 public int NumberOfStarts => _personService.GetAllPersonStarts().Count();
30
34 public int NumberOfInactiveStarts => _personService.GetAllPersonStarts().Count(s => !s.IsActive);
35
39 public int NumberOfStartsWithMissingCompetition => _personService.GetAllPersonStarts().Count(s => s.IsActive && !s.IsCompetitionObjAssigned);
40
44 public int NumberOfValidStarts => _personService.GetAllPersonStarts().Count(s => s.IsActive && s.IsCompetitionObjAssigned);
45
48 {
49 DocXPlaceholderHelper.TextPlaceholders textPlaceholder = new DocXPlaceholderHelper.TextPlaceholders();
50 foreach (string placeholder in Placeholders.Placeholders_AnalyticsStartsCountersNumberStarts) { textPlaceholder.Add(placeholder, NumberOfStarts.ToString()); }
51 foreach (string placeholder in Placeholders.Placeholders_AnalyticsStartsCountersNumberValidStarts) { textPlaceholder.Add(placeholder, NumberOfValidStarts.ToString()); }
52 foreach (string placeholder in Placeholders.Placeholders_AnalyticsStartsCountersNumberInactiveStarts) { textPlaceholder.Add(placeholder, NumberOfInactiveStarts.ToString()); }
53 foreach (string placeholder in Placeholders.Placeholders_AnalyticsStartsCountersNumberStartsWithMissingCompetition) { textPlaceholder.Add(placeholder, NumberOfStartsWithMissingCompetition.ToString()); }
54 return textPlaceholder;
55 }
56
58 public List<string> SupportedDocumentPlaceholderKeys => new List<string>()
59 {
60 Placeholders.PLACEHOLDER_KEY_ANALYTICS_STARTS_COUNTERS_NUMBER_STARTS,
61 Placeholders.PLACEHOLDER_KEY_ANALYTICS_STARTS_COUNTERS_NUMBER_VALID_STARTS,
62 Placeholders.PLACEHOLDER_KEY_ANALYTICS_STARTS_COUNTERS_NUMBER_INACTIVE_STARTS,
63 Placeholders.PLACEHOLDER_KEY_ANALYTICS_STARTS_COUNTERS_NUMBER_STARTS_WITH_MISSING_COMPETITION
64 };
65 }
66}
DocXPlaceholderHelper.TextPlaceholders CollectDocumentPlaceholderContents()
Collect the values for all document placeholders that are supported by this IAnalyticsModule....
AnalyticsModuleStartsCounters(IPersonService personService)
Constructor for the AnalyticsModuleStartsCounters
List< string > SupportedDocumentPlaceholderKeys
List of all document placeholder keys that are supported by this analytics module....
int NumberOfValidStarts
Number of active starts with a competition assigned (valid starts)
bool AnalyticsAvailable
Flag indicating if the analytics module has data.
int NumberOfStartsWithMissingCompetition
Number of active starts with missing competitions.
Interface for a service used to get and store a list of Person objects.