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
DocumentStrategyResultList.cs
6
8{
13 {
14 private readonly IScoreService _scoreService;
15
22 public DocumentStrategyResultList(IScoreService scoreService, IWorkspaceService workspaceService, IServiceProvider serviceProvider) : base(workspaceService, serviceProvider)
23 {
24 _scoreService = scoreService;
25 }
26
29
31 public override string TemplatePath => DocumentService.GetDocumentPathAbsolute(WorkspaceSettings.SETTING_DOCUMENT_CREATION_RESULT_LIST_TEMPLATE_PATH, _workspaceService);
32
36 public override bool CreateMultiplePages => false;
37
42 public override Person[] GetItems()
43 {
44 List<Person> sortedPersons = _scoreService.GetPersonsSortedByScore(ResultTypes.Overall, true);
45 _scoreService.UpdateResultListPlacesForAllPersons();
46 return sortedPersons.ToArray();
47 }
48 }
49}
DocumentStrategyBase(IWorkspaceService workspaceService, IServiceProvider serviceProvider)
Constructor for the document strategy base class.
DocumentStrategyResultList(IScoreService scoreService, IWorkspaceService workspaceService, IServiceProvider serviceProvider)
Constructor for the document strategy for a result list.
override Person[] GetItems()
Return a list of all Person items sorted by their scores.
override string TemplatePath
Gets the path to the template used for creating the document.
override DocumentCreationTypes DocumentType
Gets the type of document this strategy creates.
Class describing a person.
Definition Person.cs:12
Service used to create documents like certificates or start lists.
static string GetDocumentPathAbsolute(string documentCreationSettingKey, IWorkspaceService workspaceService)
Get the absolute path for the requested document creation setting.
Interface for a service used to calculate the scores for all persons.
Interface for a service used to manage a workspace.
ResultTypes
Available result types.
Definition ResultTypes.cs:7
DocumentCreationTypes
Different types of documents that can be created.