Skip to content

Migrate IDateTimeSource analyser checks to recommend System.TimeProvider instead #417

@credfeto

Description

@credfeto

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions