Thingsboard.Net.Flurl.DependencyInjection
3.4.3
See the version list below for details.
dotnet add package Thingsboard.Net.Flurl.DependencyInjection --version 3.4.3
NuGet\Install-Package Thingsboard.Net.Flurl.DependencyInjection -Version 3.4.3
<PackageReference Include="Thingsboard.Net.Flurl.DependencyInjection" Version="3.4.3" />
paket add Thingsboard.Net.Flurl.DependencyInjection --version 3.4.3
#r "nuget: Thingsboard.Net.Flurl.DependencyInjection, 3.4.3"
// Install Thingsboard.Net.Flurl.DependencyInjection as a Cake Addin #addin nuget:?package=Thingsboard.Net.Flurl.DependencyInjection&version=3.4.3 // Install Thingsboard.Net.Flurl.DependencyInjection as a Cake Tool #tool nuget:?package=Thingsboard.Net.Flurl.DependencyInjection&version=3.4.3
Thingsboard.NET is a .NET client library for Thingsboard IoT Platform. It is a .NET Standard 2.0 library, so it can be used in .NET Core and .NET Framework applications.
Installing
You can use the Thingsboard.NET.Flurl library in ASP.NET Core applications. Te dependency injection mode is supported.
First, add the Thingsboard.NET.Flurl.DependencyInjection library to your project:
PM> Install-Package Thingsboard.NET.Flurl.DependencyInjection
Usage
Integration to ASP.NET Core
Register the Thingsboard.NET.Flurl services in the ConfigureServices method of Startup.cs:
// add package "Thingsboard.Net.Flurl.DependencyInjection" Version="3.4.1.1"
serviceBuilder.AddThingsboardNet(options =>
{
options.Username = "tenant@thingsboard.org";
options.Password = "tenant";
options.BaseUrl = "http://localhost:8080";
});
Then you can inject the client factory in your controllers:
public class HomeController : Controller
{
private readonly ITbAuthClient _authClient;
public HomeController(ITbAuthClient authClient)
{
_authClient = authClient;
}
public async Task<IActionResult> Index()
{
var userInfo = await _authClient.GetCurrentUserAsync();
return View(userInfo);
}
}
Customization options
You can customize the client options before invoke RPC methods:
public class HomeController : Controller
{
private readonly ITbAuthClient _authClient;
public HomeController(ITbAuthClient authClient)
{
_authClient = authClient;
}
public async Task<IActionResult> Index()
{
var userInfo = await auth
.WithCredentials("newuser@thingsboard.com", "your-password")
.WithBaseUrl("https://tb-server")
.GetCurrentUserAsync();
return View(userInfo);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0.0)
- Thingsboard.Net.Flurl (>= 3.4.3)
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 |
---|---|---|
3.5.1.5 | 407 | 10/11/2023 |
3.5.1.4 | 212 | 7/7/2023 |
3.5.1.2 | 143 | 7/7/2023 |
3.5.1 | 153 | 7/7/2023 |
3.4.33 | 296 | 3/22/2023 |
3.4.32 | 223 | 3/14/2023 |
3.4.31 | 272 | 3/13/2023 |
3.4.30 | 229 | 3/7/2023 |
3.4.29 | 230 | 3/7/2023 |
3.4.28 | 222 | 3/7/2023 |
3.4.27 | 222 | 3/7/2023 |
3.4.26 | 242 | 3/7/2023 |
3.4.25 | 242 | 3/6/2023 |
3.4.24 | 242 | 3/6/2023 |
3.4.23 | 239 | 3/3/2023 |
3.4.22 | 249 | 3/3/2023 |
3.4.21 | 239 | 3/3/2023 |
3.4.20 | 247 | 2/27/2023 |
3.4.19 | 268 | 2/6/2023 |
3.4.18 | 342 | 1/4/2023 |
3.4.17 | 283 | 1/4/2023 |
3.4.16 | 347 | 11/22/2022 |
3.4.15 | 338 | 11/15/2022 |
3.4.14 | 370 | 11/14/2022 |
3.4.13 | 361 | 11/10/2022 |
3.4.12 | 345 | 11/10/2022 |
3.4.11 | 372 | 10/28/2022 |
3.4.10 | 383 | 10/22/2022 |
3.4.9 | 389 | 10/22/2022 |
3.4.8 | 413 | 10/22/2022 |
3.4.7 | 416 | 10/21/2022 |
3.4.6 | 386 | 10/21/2022 |
3.4.5 | 417 | 10/20/2022 |
3.4.3 | 384 | 10/18/2022 |
3.4.1.9 | 752 | 10/18/2022 |
3.4.1.4 | 412 | 10/17/2022 |
3.4.1.1 | 396 | 10/17/2022 |