Skip to content

timecop-net/Timecop.Extensions.DependencyInjection

Repository files navigation

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.

About

Extensions to register Timecop's IClock with IServiceCollection in one line of code

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors