Subtasks
5a
Instead of passing all the configs around, the ConfigManager should contain query methods for getting the different options.
Acceptance criteria
- There is a
GetBaseOptions method
- There is a
GetParserOptions method
- There is a
GetRenderOptions method
- There is a
GetSnapshotOptions method
- The getters throw an exception if
LoadAsync has not been run yet (and fields therefore are null)
LoadAsync still returns the options, but only for the unit tests to work
5b
In Program, the ConfigManager is initialized and loaded. Factories receive the options they need using query methods, while the use case should take the whole config manager as a parameter.
Acceptance criteria
Program loads the config
- All three factories receive their options from config manager query methods
- The
UpdateGraphUseCase receives the config manager as a parameter, and queries for the options when needed
5c
The loading of the configs should no longer be in the ConfigManager itself, but in a new LoadConfigUseCase that initializes the ConfigManager.
Acceptance criteria
- There is a
LoadConfigUseCase with a RunAsync method
- The use case contains all the logic for loading the config from the file, including relevant DTO's
RunAsync initializes and returns the ConfigManager
- The
ConfigManager now takes the four options as parameters in the constructor
Program.cs runs the use case
Subtasks
5a
Instead of passing all the configs around, the
ConfigManagershould contain query methods for getting the different options.Acceptance criteria
GetBaseOptionsmethodGetParserOptionsmethodGetRenderOptionsmethodGetSnapshotOptionsmethodLoadAsynchas not been run yet (and fields therefore are null)LoadAsyncstill returns the options, but only for the unit tests to work5b
In
Program, theConfigManageris initialized and loaded. Factories receive the options they need using query methods, while the use case should take the whole config manager as a parameter.Acceptance criteria
Programloads the configUpdateGraphUseCasereceives the config manager as a parameter, and queries for the options when needed5c
The loading of the configs should no longer be in the
ConfigManageritself, but in a newLoadConfigUseCasethat initializes theConfigManager.Acceptance criteria
LoadConfigUseCasewith aRunAsyncmethodRunAsyncinitializes and returns theConfigManagerConfigManagernow takes the four options as parameters in the constructorProgram.csruns the use case