SharedMauiCoreLibrary.Licensing 1.1.13

dotnet add package SharedMauiCoreLibrary.Licensing --version 1.1.13                
NuGet\Install-Package SharedMauiCoreLibrary.Licensing -Version 1.1.13                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharedMauiCoreLibrary.Licensing" Version="1.1.13" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharedMauiCoreLibrary.Licensing --version 1.1.13                
#r "nuget: SharedMauiCoreLibrary.Licensing, 1.1.13"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SharedMauiCoreLibrary.Licensing as a Cake Addin
#addin nuget:?package=SharedMauiCoreLibrary.Licensing&version=1.1.13

// Install SharedMauiCoreLibrary.Licensing as a Cake Tool
#tool nuget:?package=SharedMauiCoreLibrary.Licensing&version=1.1.13                

SharedMauiCoreLibrary.Licensing

A shared library, which enables licensing of your .NET MAUI applications.

Dependencies

This extension needs a WooCommerce powered store and the WP Software License Plugin (https://wpsoftwarelicense.com/)

Documentation

Learn more here: https://andreas-reitberger.de/en/docs/programmieren/net-maui-basis-applikation-app-template/lizenz-manager/

Nuget

Get the latest version from nuget.org<br> NuGet NuGet

Available content

Please find a list of available content below.

Usage

Namespace
xmlns:behaviors="clr-namespace:AndreasReitberger.Shared.Core.Licensing;assembly=SharedMauiCoreLibrary.Licensing"
using AndreasReitberger.Shared.Core.Licensing
LicenseManager

In order to use LicenseManager, create a new Instance like shown below. .

string licenseUri = "andreas-reitberger.de";
LicenseManager manager;

//....

manager = new LicenseManager.LicenseManagerConnectionBuilder()
            .WithLicenseServer(serverAddress: licenseUri, port: null, https: true)
            .Build();

For the licenseUri use the base WordPress store address without https:\\ (like shown above).

LicenseInfo

The next step is to create a ILicenseInfo with the details of your product created in your WooCommerece store.


    info = new LicenseInfo.LicenseInfoBuilder()
        .WithLicense("The license key you want to check")
        .WithOptions(new LicenseOptions()
        {
            ProductName = "Name of your product",
            ProductIdentifier = "Your unique ProductId",
            LicenseCheckPattern = "^AR-((\\w{8})-){2}(\\w{8})$",
        })
        .Build();
Endpoints

If all is setup, you can perform following methods depending on your needs. All will return an ILicenseQueryResult object.

    ILicenseQueryResult result = await manager.CheckLicenseAsync(license: info, LicenseServerTarget.WooCommerce);
    Assert.IsTrue(result?.Success == true);

    result = await manager.DeactivateLicenseAsync(license: info, LicenseServerTarget.WooCommerce);
    Assert.IsTrue(result?.Success == true);

    result = await manager.CheckLicenseAsync(license: info, LicenseServerTarget.WooCommerce);
    Assert.IsTrue(result?.Success == false);

    result = await manager.ActivateLicenseAsync(license: info, LicenseServerTarget.WooCommerce);
    Assert.IsTrue(result?.Success == true);
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios18.0 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst18.0 is compatible.  net8.0-macos was computed.  net8.0-macos15.0 is compatible.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.13 182 10/21/2024
1.1.12 144 9/20/2024
1.1.11 111 9/10/2024
1.1.10 126 8/10/2024
1.1.9 114 6/14/2024
1.1.8 108 5/10/2024
1.1.7 137 4/11/2024
1.1.5 140 3/27/2024
1.1.4 124 3/20/2024
1.1.3 111 3/19/2024
1.1.2 146 2/12/2024
1.1.1 198 12/6/2023
1.1.0 150 11/14/2023
1.0.16 159 9/16/2023
1.0.15 157 8/9/2023
1.0.14 168 7/22/2023

Check GitHub releases for changelog.