Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 849 Bytes

File metadata and controls

27 lines (16 loc) · 849 Bytes

Timecop.Extensions.DependencyInjection

Register Timecop's IClock with Microsoft.DependencyInjection in one line of code.

Supports .NET 6 and 7.

Installation

You can install Timecop.Extensions.DependencyInjection from NuGet using your IDE or the .NET CLI:

dotnet add package Timecop.Extensions.DependencyInjection

Usage

The following code registers the implementation of IClock that always returns the current time. The instance is registered as a singletone.

using TCop.Extensions.DependencyInjection;

services.AddTimecop();

License

Timecop.Extensions.DependencyInjection was created by Dmytro Khmara and is licensed under the MIT license.