24 _raceService = raceService;
44 if(_raceService.PersistedRacesVariant ==
null || _raceService.PersistedRacesVariant?.Races ==
null) {
return null; }
47 List<Race> raceClones =
new List<Race>();
48 foreach (
Race originalRace
in _raceService.PersistedRacesVariant?.Races)
50 Race newRace =
new Race(originalRace,
true);
51 newRace.Starts =
new System.Collections.ObjectModel.ObservableCollection<
PersonStart>(newRace.
Starts.Where(s => s.IsActive));
52 raceClones.Add(newRace);
54 return raceClones.ToArray();
DocumentStrategyBase(IWorkspaceService workspaceService, IServiceProvider serviceProvider)
Constructor for the document strategy base class.
override DocumentCreationTypes DocumentType
Gets the type of document this strategy creates.
override Race[] GetItems()
Return a list of all Race items of the RaceService.PersistedRacesVariant
DocumentStrategyRaceStartList(IRaceService raceService, IWorkspaceService workspaceService, IServiceProvider serviceProvider)
Constructor for the document strategy for a race start list.
override string TemplatePath
Gets the path to the template used for creating the document.
override bool CreateMultiplePages
This always returns false
Class describing a start of a person.
Class that represents a single race.
ObservableCollection< PersonStart > Starts
List with all starts of this Race
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.
Class holding all workspace settings.
Interface for a service used to manage Race and RacesVariant objects.
Interface for a service used to manage a workspace.
DocumentCreationTypes
Different types of documents that can be created.