Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace SystemClock with TimeProvider #55

Conversation

kamilbaczek
Copy link
Collaborator

The commit involves replacing all references to SystemClock with TimeProvider in various files. SystemClock was deleted and TimeProvider was used for achieving similar functionality. This change was made to use a more flexible time provider which will be useful for future adjustments.

The commit involves replacing all references to SystemClock with TimeProvider in various files. SystemClock was deleted and TimeProvider was used for achieving similar functionality. This change was made to use a more flexible time provider which will be useful for future adjustments.
A new file named ClockModule.cs has been added within the Fitnet common clock namespace and a method called AddClock is established. The method, taking the IServiceCollection services as a parameter, returns the Singleton of the TimeProvider System. In addition, the TimeProvider instance injection in Program.cs has been replaced by AddClock().
@kamilbaczek kamilbaczek merged commit 92d63ac into main Nov 29, 2023
2 checks passed
@kamilbaczek kamilbaczek deleted the 42-adoption-of-net-8-native-idatetimeprovider-support-in-place-of-isystemclock branch November 29, 2023 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adoption of .NET 8 Native IDateTimeProvider Support in Place of ISystemClock
1 participant