azure-activedirectory-identitymodel-extensions-for-dotnet icon indicating copy to clipboard operation
azure-activedirectory-identitymodel-extensions-for-dotnet copied to clipboard

Feature/time provider

Open trejjam opened this issue 3 months ago • 0 comments

Use TimeProvider instead of DateTime.Now

  • [x] You've read the Contributor Guide and Code of Conduct.
  • [ ] You've included unit or integration tests for your change, where applicable.
  • [x] You've included inline docs for your change, where applicable.
  • [x] If any gains or losses in performance are possible, you've included benchmarks for your changes. More info
  • [x] There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

This PR adds TimeProvider for .net8+ targets. It's done as an additional property, TimeProvider, on Descriptor/Parameter classes.

Description

I added TimeProvider to nearly all usages of DateTime.Now. Some were too difficult to add (BC Break).

Fixes #2572

trejjam avatar May 27 '24 10:05 trejjam