SharedMauiCoreLibrary.Licensing 1.1.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package SharedMauiCoreLibrary.Licensing --version 1.1.4                
NuGet\Install-Package SharedMauiCoreLibrary.Licensing -Version 1.1.4                
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.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SharedMauiCoreLibrary.Licensing --version 1.1.4                
#r "nuget: SharedMauiCoreLibrary.Licensing, 1.1.4"                
#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.4

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

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-ios17.2 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst17.2 is compatible.  net8.0-macos was computed.  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 173 10/21/2024
1.1.12 137 9/20/2024
1.1.11 107 9/10/2024
1.1.10 122 8/10/2024
1.1.9 110 6/14/2024
1.1.8 105 5/10/2024
1.1.7 134 4/11/2024
1.1.5 137 3/27/2024
1.1.4 121 3/20/2024
1.1.3 108 3/19/2024
1.1.2 143 2/12/2024
1.1.1 193 12/6/2023
1.1.0 147 11/14/2023
1.0.16 156 9/16/2023
1.0.15 154 8/9/2023
1.0.14 163 7/22/2023

Check GitHub releases for changelog.