Skip to content

The Microsoft .NET dependency injection library extension for the official unofficial .NET NHL API

License

Notifications You must be signed in to change notification settings

Afischbacher/Nhl.Api.Extensions.Microsoft.DependencyInjection

Repository files navigation

Build/Test Build/Test NuGet Issues Maintenance

Nhl.Api.Extensions.Microsoft.DependencyInjection 🧑‍💻

The Microsoft .NET dependency injection library extension for the official unofficial .NET NHL API 🏒

An extension for the Nhl.Api to easily add the Nhl.Api library to any .NET project using the built in .NET dependency injection library

Installing Nhl.Api.Extensions.Microsoft.DependencyInjection 💭

You should install Nhl.Api.Extensions.Microsoft.DependencyInjection with NuGet:

Install-Package Nhl.Api.Extensions.Microsoft.DependencyInjection

Or via the .NET Core command line interface:

dotnet add package Nhl.Api.Extensions.Microsoft.DependencyInjection

Implementation 🚀

Using and implementing the Nhl.Api dependency injection extension is as simple as one line on C# code ⌨️

builder.Services.AddNhlApi();

You can also use a method parameter to specify the type of dependency life time

Singleton (Default)

builder.Services.AddNhlApi(serviceLifetime: ServiceLifetime.Singleton);

Transient

builder.Services.AddNhlApi(serviceLifetime: ServiceLifetime.Transient);

Scoped

builder.Services.AddNhlApi(serviceLifetime: ServiceLifetime.Scoped);

Bugs 🐛

If you have any issues with the library or suggestions, please feel free to create an issue and it will be adressed as soon as possible :)

About

The Microsoft .NET dependency injection library extension for the official unofficial .NET NHL API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages