net.tellerapps.sunrise-sunset-client.dependency-injection
5.0.0
dotnet add package net.tellerapps.sunrise-sunset-client.dependency-injection --version 5.0.0
NuGet\Install-Package net.tellerapps.sunrise-sunset-client.dependency-injection -Version 5.0.0
<PackageReference Include="net.tellerapps.sunrise-sunset-client.dependency-injection" Version="5.0.0" />
<PackageVersion Include="net.tellerapps.sunrise-sunset-client.dependency-injection" Version="5.0.0" />
<PackageReference Include="net.tellerapps.sunrise-sunset-client.dependency-injection" />
paket add net.tellerapps.sunrise-sunset-client.dependency-injection --version 5.0.0
#r "nuget: net.tellerapps.sunrise-sunset-client.dependency-injection, 5.0.0"
#:package net.tellerapps.sunrise-sunset-client.dependency-injection@5.0.0
#addin nuget:?package=net.tellerapps.sunrise-sunset-client.dependency-injection&version=5.0.0
#tool nuget:?package=net.tellerapps.sunrise-sunset-client.dependency-injection&version=5.0.0
SunriseSunset
https://sunrise-sunset.org/ API client
GitHub: https://github.com/gilad-teller/SunriseSunset
SunriseSunsetClient Dependency Injection
This extension allows you to easily add SunriseSunsetClient to your .Net 5 application
Add this to the Startup:
services.AddSunriseSunsetClient();
When adding this service, SunriseSunsetService and SunriseSunsetHttpClient are added as scoped services.
Also, an HttpClient is registered and binded to SunriseSunsetService.
This means you don't need to manage the HttpClient.
You can then consume SunriseSunsetService as a dependency.
public class MyService
{
private readonly SunriseSunsetService _sunriseSunsetService;
public MyService(SunriseSunsetService sunriseSunsetService)
{
_sunriseSunsetService = sunriseSunsetService;
}
public async Task<Response> Get()
{
return await _sunriseSunsetService.Get(51.5010, -0.1406, new DateTime(2021, 1, 1));
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net5.0
- Microsoft.Extensions.Http (>= 5.0.0)
- net.tellerapps.sunrise-sunset-client (>= 5.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0 | 532 | 12/18/2021 |
Sunset Sunrise client with dependency injection support.
Receiving data from https://sunrise-sunset.org/