SplatDev.Licensing.Client
1.0.4
See the version list below for details.
dotnet add package SplatDev.Licensing.Client --version 1.0.4
NuGet\Install-Package SplatDev.Licensing.Client -Version 1.0.4
<PackageReference Include="SplatDev.Licensing.Client" Version="1.0.4" />
paket add SplatDev.Licensing.Client --version 1.0.4
#r "nuget: SplatDev.Licensing.Client, 1.0.4"
// Install SplatDev.Licensing.Client as a Cake Addin
#addin nuget:?package=SplatDev.Licensing.Client&version=1.0.4
// Install SplatDev.Licensing.Client as a Cake Tool
#tool nuget:?package=SplatDev.Licensing.Client&version=1.0.4
Licensing Client Library for C#
This is the official client library for the Licensing API for C#.
Installation
via nuget
Install-Package SplatDev.Licensing.Client
Usage
Once installed, you can use the library to interact with the Licensing API.
NewLicenseAsync()
This method will connect to the API endpoint and generate a new license. The method returns a License
object.
Upon License creation, it must be stored in a secure location. The License
object contains the following properties:
{
"id": 2,
"licenseId": 2,
"license": {
"id": 3,
"licenseKey": "A UNIQUE LICENSE KEY",
"issuedOn": "2024-02-05T14:58:44.9189992",
"allowedActivations": 1,
"active": true,
"locked": true,
"valid": true,
"purchaseOnBy": ""
},
"verifiedOn": "2024-03-30T18:31:42.8290894Z",
"ipAddress": "YOUR IP ADDRESS",
"macAddress": "YOUR MAC ADDRESS",
"machineId": "YOUR MACHINE ID",
"isValid": true,
"inTrial": true,
"daysLeft": 30,
"isPurchased": false
}
In order to validate a license, use the following method:
ValidateLicenseAsync(string licenseKey)
licenseKey
- The license key to validate.
This method will connect to the API endpoint and validate a license key. The method returns a License
object.
{
"id": 2,
"licenseId": 2,
"license": {
"id": 3,
"licenseKey": "A UNIQUE LICENSE KEY",
"issuedOn": "2024-02-05T14:58:44.9189992",
"allowedActivations": 1,
"active": true,
"locked": true,
"valid": true,
"purchaseOnBy": ""
},
"verifiedOn": "2024-03-30T18:31:42.8290894Z",
"ipAddress": "YOUR IP ADDRESS",
"macAddress": "YOUR MAC ADDRESS",
"machineId": "YOUR MACHINE ID",
"isValid": true,
"inTrial": true,
"daysLeft": 30,
"isPurchased": false
}
Once the trial is over, the isPurchased
property will be set to true
and the daysLeft
property will be set to 0
, if the users purchases the license.
Otherwise, the application will be locked and the isValid
property will be set to false
.
Notice
You must implement whatever logic in your application to block its use after the trial is over and no license is purchased.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.