You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/TimeProviderExtensions/TimeProviderExtensions.csproj
+9-22Lines changed: 9 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -6,29 +6,12 @@
6
6
<Company>Egil Hansen</Company>
7
7
<Authors>Egil Hansen</Authors>
8
8
<Description>
9
-
# TimeProvider Extensions
10
-
11
-
Testing extensions for the [`System.TimeProvider`](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider) API. It includes:
12
-
13
-
- An advanced test/fake version of the `TimeProvider` type, named `ManualTimeProvider`, that allows you to control the progress of time during testing deterministically (see the difference to Microsoft's `FakeTimeProvider` below).
14
-
- A backported version of `PeriodicTimer` that supports `TimeProvider` in .NET 6.
15
-
16
-
## Quick start
17
-
18
-
This describes how to get started:
19
-
20
-
1. Get the latest release from https://www.nuget.org/packages/TimeProviderExtensions.
21
-
22
-
2. Take a dependency on `TimeProvider` in your production code. Inject the production version of `TimeProvider` available via the [`TimeProvider.System`](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider.system?#system-timeprovider-system) property during production.
23
-
24
-
3. During testing, inject the `ManualTimeProvider` from this library. This allows you to write tests that run fast and predictably.
25
-
- Advance time by calling `Advance(TimeSpan)` or `SetUtcNow(DateTimeOffset)` or
26
-
- Jump ahead in time using `Jump(TimeSpan)` or `Jump(DateTimeOffset)`.
27
-
28
-
4. See the **[`ManualTimeProvider API`](https://github.com/egil/TimeProviderExtensions/blob/main/docs/TimeProviderExtensions.ManualTimeProvider.md) page** for the full API documentation for `ManualTimeProvider`.
29
-
30
-
5. Read the [README](https://github.com/egil/TimeProviderExtensions) for further details and examples.
9
+
Testing extensions for the [`System.TimeProvider`](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider) API. It includes
10
+
an advanced test/fake version of the `TimeProvider` type, named `ManualTimeProvider`, that allows you to control the progress of time
11
+
during testing deterministically (see the difference to Microsoft's `FakeTimeProvider` below) and a backported version of
12
+
`PeriodicTimer` that supports `TimeProvider` in .NET 6.
0 commit comments