Summary
The analyser currently has checks that relate to FunFair.Common.Services.IDateTimeSource. These should be updated (or replaced) so that they recommend using the standard .NET 8+ System.TimeProvider abstraction instead.
What to change
- Identify all analyser rules/checks that reference or enforce use of
IDateTimeSource.
- Update those checks to flag
IDateTimeSource usage as a diagnostic and suggest migrating to System.TimeProvider.
- Where a check previously enforced correct use of
IDateTimeSource, consider whether an equivalent check makes sense for TimeProvider (e.g. ensuring it is injected rather than using TimeProvider.System directly).
Why
References
Summary
The analyser currently has checks that relate to
FunFair.Common.Services.IDateTimeSource. These should be updated (or replaced) so that they recommend using the standard .NET 8+System.TimeProviderabstraction instead.What to change
IDateTimeSource.IDateTimeSourceusage as a diagnostic and suggest migrating toSystem.TimeProvider.IDateTimeSource, consider whether an equivalent check makes sense forTimeProvider(e.g. ensuring it is injected rather than usingTimeProvider.Systemdirectly).Why
IDateTimeSourceis a custom abstraction that is being phased out in favour of the built-inSystem.TimeProvider(see Use TimeProvider/FakeTimeProvider instead of ICurrentTimeSource/IDateTimeSource credfeto/cs-template#763).References