Skip to content

The Trinsic C# / .NET SDK

The Trinsic C# / .NET SDK makes it easy to interact with the Trinsic API from your .NET application. The most recent version of the library can be found on NuGet. The Trinsic SDK supports .NET applications written in C#, VB.NET, and F# that utilize any supported version of .NET Core. You can also find the SDKs source on Github.

Supported runtimes

.NET targets for iOS, Android, and Blazor are fully supported using the same package dependencies via .NET 6.

Installation in a new project

Add the required dependencies from Nuget.org

PM> Install-Package Trinsic
dotnet add package Trinsic
<PackageReference Include="Trinsic" />

To register the services with dependency injection pipeline:

services.AddTrinsic();

To configure additional parameters:

services.AddTrinsic(options =>
{
    // to configure the service with your auth token
    options.ServiceOptions.AuthToken = "<auth_token>";
})

The service can then be injected in your controller as

public MyController(TrinsicService trinsicService)
{
    // init
}

Alternatively, you can simply instantiate this service with or without parameters

var trinsic = new TrinsicService();

// or

var trinsic = new TrinsicService(new ServiceOptions
{
    AuthToken = "<auth_token>"
});