### Install License Manager X Client Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Use the .NET CLI to add the required NuGet package to your project. ```bash dotnet add package LicenseManager_12noon.Client ``` -------------------------------- ### WPF Application License Integration with LicenseManagerX Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Provides a complete example of integrating license validation into a WPF application's startup process. Handles license display and feature enablement based on license type. ```csharp using System.Windows; using LicenseManager_12noon.Client; using Standard.Licensing; public partial class App : Application { private const string ProductName = "My Application"; private const string ProductID = "MyApp-2024"; private const string PublicKey = @"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8rVkInZuKd56LlNb9vTqcSaAD8hwsc/iMn++wHppvyOfNexHnid+03PcKTn6MwXwv7D43fmqZtbYGSmccNA1cQ=="; public static LicenseFile License { get; private set; } = new(); public static bool IsLicensed { get; private set; } protected override void OnStartup(StartupEventArgs e) { ValidateLicense(); base.OnStartup(e); } private void ValidateLicense() { License = new LicenseFile(); IsLicensed = License.IsLicenseValid(ProductID, PublicKey, out string messages); if (!IsLicensed) { MessageBox.Show( messages, ProductName, MessageBoxButton.OK, MessageBoxImage.Error ); // Option 1: Terminate the application // Shutdown(); // Option 2: Continue with limited functionality } else { // Display license info string licenseInfo = $"Licensed to: {License.Name} " + "Company: {License.Company} " + "Type: {License.StandardOrTrial}"; if (License.ExpirationDays > 0 && License.ExpirationDays <= 30) { MessageBox.Show( $"Your license expires in {License.ExpirationDays} days.", ProductName, MessageBoxButton.OK, MessageBoxImage.Warning ); } } } } // In MainWindow.xaml.cs - Access license properties public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); if (App.IsLicensed) { LicenseTypeLabel.Text = App.License.StandardOrTrial.ToString(); LicenseeLabel.Text = App.License.Name; ExpirationLabel.Text = App.License.ExpirationDays == 0 ? "Never" : App.License.ExpirationDateUTC.ToString("D"); // Enable features based on license type if (App.License.StandardOrTrial == LicenseType.Trial) { DisablePremiumFeatures(); } } } } ``` -------------------------------- ### License Attributes Example Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Custom attributes can be added to licenses using the key=value format. These are saved on new lines within the license file. ```text Region=US SupportLevel=Premium ``` -------------------------------- ### Create Standard License via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Generate a standard license file from a keypair, with options to overwrite existing files. ```bash # Create a standard license with default settings from .private file lmx --private my.private --license customer.lic # Short form lmx -p my.private -l customer.lic # Overwrite existing license file lmx -p my.private -l customer.lic --force ``` -------------------------------- ### Create Enterprise License via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Generate licenses with custom metadata, seat counts, and product versions. ```bash # Create enterprise license for 100 seats lmx -p my.private -l enterprise.lic --quantity 100 --product-version 2.1.0 # Create license with custom product features lmx -p my.private -l featured.lic --product-features "Edition=Pro MaxUsers=50 Feature1=Enabled" # Create license with custom attributes lmx -p my.private -l attributed.lic --license-attributes "Region=US SupportLevel=Premium Department=Engineering" # Combine multiple options lmx -p my.private -l full.lic \ --type Trial \ --expiration-days 30 \ --quantity 10 \ --product-version 3.0.0 \ --product-features "Edition=Enterprise Feature1=Enabled" \ --license-attributes "CustomerTier=Gold Region=EU" ``` -------------------------------- ### Create Trial License via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Generate time-limited licenses using expiration days or specific calendar dates. ```bash # Create a 30-day trial license lmx -p my.private -l trial.lic --type Trial --expiration-days 30 # Create a trial license with specific expiration date lmx -p my.private -l trial.lic --type Trial --expiration-date 2024-12-31 # Create a perpetual license (no expiration) lmx -p my.private -l perpetual.lic --type Standard --expiration-days 0 ``` -------------------------------- ### Create a New License (GUI) Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Steps to create a new license using the graphical user interface. ```APIDOC ## Create a New License (GUI) Follow these steps to create a new license using the License Manager X GUI: 1. Create a keypair by entering a value for _Passphrase_ and pressing _Create Keypair_. 2. Enter a _Product ID_. 3. Optionally, lock the license to a specific build of the licensed application by providing a unique file path (e.g., an EXE or DLL). 4. Fill in the product information, license information, and licensee information. 5. Press the _Save Keypair..._ button to save the `.private` file. Keep this file secure and do not add it to source control. 6. Press the _Save License..._ button to save the `.lic` file. ``` -------------------------------- ### Display License Properties via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt View the contents of a .private keypair file using standard or short-form flags. ```bash # Display all properties from the .private file lmx --private my.private # Short form lmx -p my.private ``` -------------------------------- ### Create a License Based on an Existing License (GUI) Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Steps to create a new license by loading and modifying an existing license file. ```APIDOC ## Create a License Based on an Existing License (GUI) Use this process to generate a new license file based on existing `.private` or `.lic` files: 1. Press the *Load Keypair or License or Both...* button or drag and drop `.private` and/or `.lic` files. 2. License Manager X will validate the loaded license file. If invalid, you can create a new one. 3. Update the product, license, or licensee information as needed. 4. Press the _Save Keypair..._ button to save the `.private` file. 5. Press the _Save License..._ button to create the new `.lic` file. ``` -------------------------------- ### CLI - Create License Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Generate standard, trial, enterprise, or assembly-locked licenses. ```APIDOC ## CLI - Create License ### Description Generate a new license file from an existing keypair. ### Parameters - **--private / -p** (string) - Required - Path to the .private keypair file. - **--license / -l** (string) - Required - Path to the output .lic file. - **--type** (string) - Optional - License type (Standard, Trial). - **--expiration-days** (int) - Optional - Days until expiration. - **--expiration-date** (date) - Optional - Specific expiration date (YYYY-MM-DD). - **--quantity** (int) - Optional - Number of seats. - **--product-version** (string) - Optional - Product version string. - **--product-features** (string) - Optional - Key-value pairs for features. - **--license-attributes** (string) - Optional - Key-value pairs for attributes. - **--lock** (string) - Optional - Path to executable for assembly locking. - **--force** (flag) - Optional - Overwrite existing license file. ``` -------------------------------- ### License Manager X CLI Output Arguments Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md At least one of --license or --save must be provided to generate or modify license files. --license specifies the output path for the new .lic file, while --save updates the .private file. ```bash --license, -l ``` ```bash --save, -s ``` -------------------------------- ### Generate Licenses with lmx CLI Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Use the lmx command-line tool to create various license types, including trials, locked licenses, and custom-featured licenses, using a .private configuration file. ```cmd REM Display properties from .private file lmx -p my.private REM Create a standard license using default settings from .private file lmx -p my.private -l customer.lic REM Create a 30-day trial license lmx -p my.private -l trial.lic --type Trial --expiration-days 30 REM Create an enterprise license with custom quantity and version lmx -p my.private -l enterprise.lic --quantity 100 --product-version 2.1.0 REM Create a license locked to a specific executable lmx -p my.private -l locked.lic --lock C:\MyApp\MyApp.exe REM Create a license with custom product features lmx -p my.private -l featured.lic --product-features "Color=Blue Bird=Heron MaxUsers=50" REM Create a license with custom attributes lmx -p my.private -l attributed.lic --license-attributes "Department=Engineering Location=Seattle" REM Combine multiple options lmx -p my.private -l full.lic --type Trial --expiration-days 30 --lock C:\MyApp\MyApp.exe --product-features "Edition=Pro" --license-attributes "CustomerTier=Gold" ``` -------------------------------- ### Accessing Product Features with LicenseManagerX Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Demonstrates how to check for and retrieve custom product features defined in a license. Ensure the license is valid before accessing features. ```csharp using LicenseManager_12noon.Client; LicenseFile license = new(); if (license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages)) { // Check if a feature exists before accessing if (license.HasProductFeature("MaxUsers")) { string maxUsers = license.GetProductFeature("MaxUsers"); Console.WriteLine($"Maximum users allowed: {maxUsers}"); } // Iterate all custom product features foreach (var feature in license.ProductFeatures) { Console.WriteLine($"Feature: {feature.Key} = {feature.Value}"); } // Feature-based functionality if (license.HasProductFeature("Edition")) { string edition = license.GetProductFeature("Edition"); switch (edition) { case "Pro": EnableProFeatures(); break; case "Enterprise": EnableEnterpriseFeatures(); break; default: EnableBasicFeatures(); break; } } } ``` -------------------------------- ### CLI - Display License Properties Source: https://context7.com/12noonllc/licensemanagerx/llms.txt View properties stored in a .private keypair file using the command line interface. ```APIDOC ## CLI - Display License Properties ### Description View properties stored in a .private keypair file. ### Usage `lmx --private | -p ` ### Parameters - **--private / -p** (string) - Required - Path to the .private keypair file. ``` -------------------------------- ### Command Line Interface (CLI) - Usage Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Information on how to use the License Manager X command line interface for license generation. ```APIDOC ## Command Line Interface (CLI) - Usage The License Manager X application can be operated via its command line interface. ### Executable `lmx` (Windows app execution alias) ### Basic Syntax ```cmd lmx --private [--save | --license | --save --license ] [options] ``` ### Required Arguments - `--private, -p `: Path to the `.private` file. ``` -------------------------------- ### Create Assembly-Locked License via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Bind a license to a specific executable file path for enhanced security. ```bash # Lock license to a specific executable lmx -p my.private -l locked.lic --lock "C:\MyApp\MyApp.exe" # Combine with other options lmx -p my.private -l locked-trial.lic \ --type Trial \ --expiration-days 14 \ --lock "C:\MyApp\MyApp.exe" ``` -------------------------------- ### Command Line Interface (CLI) - Arguments Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Details on the arguments available for the License Manager X CLI. ```APIDOC ## Command Line Interface (CLI) - Arguments ### One or More Arguments Required (Choose at least one): - `--license, -l `: Path to the new `.lic` file (will not overwrite unless `--force` is used). - `--save, -s`: Save the modified properties to the `.private` file. ### Optional Arguments: - `--force, -f`: Overwrite the license file if it already exists. - `--product-version, -v `: Specify the product version. - `--product-publish-date, -pd `: Specify the product publish date (YYYY-MM-DD). - `--product-features, -pf `: Specify product features as key=value pairs (e.g., `feature1=value1 feature2=value2`). - `--type, -t `: Specify the license type (Standard or Trial). - `--quantity, -q `: Specify the license quantity (positive integer). - `--expiration-days, -dy `: Set expiration in days (0 for no expiry). - `--expiration-date, -dt `: Set expiration date (YYYY-MM-DD format). - `--license-attributes, -la `: Specify license attributes as key=value pairs (e.g., `attr1=value1 attr2=value2`). - `--lock `: Lock the license to a specific file (e.g., an EXE or DLL). - `--help, -h`: Show help message. ``` -------------------------------- ### License Manager X CLI Usage Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md The command line interface for License Manager X allows for efficient license file generation. Ensure you have a .private file and specify at least one of --save or --license. ```bash lmx --private [--save | --license | --save --license ] [options] ``` -------------------------------- ### License Manager X CLI Optional Arguments Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md A variety of optional arguments are available to customize license generation, including versioning, expiration, attributes, and file locking. ```bash --force, -f ``` ```bash --product-version, -v ``` ```bash --product-publish-date, -pd ``` ```bash --product-features, -pf ``` ```bash --type, -t ``` ```bash --quantity, -q ``` ```bash --expiration-days, -dy ``` ```bash --expiration-date, -dt ``` ```bash --license-attributes, -la ``` ```bash --lock ``` ```bash --help, -h ``` -------------------------------- ### Update and Save Keypair via CLI Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Modify keypair settings and persist changes to the .private file. ```bash # Update version and save to .private file lmx -p my.private --save --product-version 2.5.0 # Update multiple settings and create license lmx -p my.private --save -l new.lic \ --product-version 3.0.0 \ --product-publish-date 2024-06-01 \ --product-features "NewFeature=Active" ``` -------------------------------- ### SecureHash Utilities Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Utility methods for computing SHA256 hashes for product identity and assembly locking. ```APIDOC ## SecureHash Utilities ### Description Methods for computing SHA256 hashes used for verification. ### Methods - **ComputeSHA256Hash(string input)**: Returns string hash of input. - **ComputeSHA256HashFile(string path)**: Returns string hash of file at path. ``` -------------------------------- ### Validate License with IsLicenseValid Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Verifies a license file located in the default executable path using a product ID and public key. ```csharp using LicenseManager_12noon.Client; using Standard.Licensing; // Constants from License Manager X application const string PRODUCT_ID = "My Product ID"; const string PUBLIC_KEY = @"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8rVkInZuKd56LlNb9vTqcSaAD8hwsc/iMn++wHppvyOfNexHnid+03PcKTn6MwXwv7D43fmqZtbYGSmccNA1cQ=="; LicenseFile license = new(); bool isValid = license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages); if (!isValid) { // License validation failed Console.WriteLine($"License invalid: {messages}"); // Options: terminate application, limit features, or prompt for valid license return; } // License is valid - access license properties Console.WriteLine($"Licensed to: {license.Name} ({license.Email})"); Console.WriteLine($"Product: {license.Product} v{license.Version}"); Console.WriteLine($"License Type: {license.StandardOrTrial}"); Console.WriteLine($"Quantity: {license.Quantity}"); // Check expiration if (license.ExpirationDays > 0) { Console.WriteLine($"Expires: {license.ExpirationDateUTC:D} ({license.ExpirationDays} days remaining)"); } else { Console.WriteLine("License: Perpetual (no expiration)"); } // Implement feature restrictions for trial licenses if (license.StandardOrTrial == LicenseType.Trial) { Console.WriteLine("Running in trial mode - some features are limited"); // Disable premium features for trial users } ``` -------------------------------- ### License Manager X CLI Required Arguments Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md The --private argument is mandatory for CLI operations. It specifies the path to the .private keypair file. ```bash --private, -p ``` -------------------------------- ### Accessing License Attributes with LicenseManagerX Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Shows how to check for and retrieve custom license attributes for metadata like region or support level. Validate the license before accessing attributes. ```csharp using LicenseManager_12noon.Client; LicenseFile license = new(); if (license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages)) { // Check for specific attributes if (license.HasLicenseAttribute("Region")) { string region = license.GetLicenseAttribute("Region"); Console.WriteLine($"Licensed region: {region}"); // Enforce regional restrictions if (region != GetCurrentRegion()) { Console.WriteLine("License not valid for this region"); return; } } if (license.HasLicenseAttribute("SupportLevel")) { string supportLevel = license.GetLicenseAttribute("SupportLevel"); Console.WriteLine($"Support level: {supportLevel}"); } // List all custom attributes foreach (var attr in license.LicenseAttributes) { Console.WriteLine($"Attribute: {attr.Key} = {attr.Value}"); } } ``` -------------------------------- ### Compute Secure Hashes in C# Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Use SecureHash utilities to generate SHA256 hashes for product identity or assembly locking. ```csharp using LicenseManager_12noon.Client; // Hash a string (used for product identity) string productIdentity = "MyProductID MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."; string identityHash = SecureHash.ComputeSHA256Hash(productIdentity); Console.WriteLine($"Identity hash: {identityHash}"); // Hash a file (used for assembly locking) string assemblyPath = @"C:\MyApp\MyApp.exe"; string assemblyHash = SecureHash.ComputeSHA256HashFile(assemblyPath); Console.WriteLine($"Assembly hash: {assemblyHash}"); ``` -------------------------------- ### Access LicenseFile Properties in C# Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Retrieve and inspect license metadata after successful validation. ```csharp using LicenseManager_12noon.Client; using Standard.Licensing; LicenseFile license = new(); if (license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out _)) { // License type and status LicenseType type = license.StandardOrTrial; // Standard or Trial DateTime expiry = license.ExpirationDateUTC; // UTC expiration date int daysLeft = license.ExpirationDays; // Days until expiration (0 = no expiry) int quantity = license.Quantity; // License seat count // Product information string product = license.Product; // Product name string version = license.Version; // Product version DateOnly? published = license.PublishDate; // Product publish date // Licensee information string name = license.Name; // Licensee name string email = license.Email; // Licensee email string company = license.Company; // Licensee company (optional) // Security information bool locked = license.IsLockedToAssembly; // True if locked to specific build string productId = license.ProductId; // Product identifier // Custom metadata Dictionary features = license.ProductFeatures; // Custom features Dictionary attributes = license.LicenseAttributes; // Custom attributes } ``` -------------------------------- ### Validate Licenses in .NET Applications Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Implement license validation in a .NET application using the LicenseManager_12noon.Client package by providing the Product ID and Public Key. ```csharp const string PRODUCT_ID = "My Product ID"; // Copied from the License Manager X application const string PUBLIC_KEY = "The Public Key"; // Copied from the License Manager X application LicenseFile license = new(); bool isValid = license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages); if (!isValid) { // INVALID MessageBox.Show("The license is invalid. " + messages); return; } // VALID if (license.StandardOrTrial == LicenseType.Trial) { // Example: LIMIT FEATURES FOR TRIAL } ``` -------------------------------- ### LicenseFile.IsLicenseValid Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Validates a license file located in the default path relative to the executable. It checks the cryptographic signature, product ID, and expiration against the provided public key. ```APIDOC ## LicenseFile.IsLicenseValid ### Description Validates a license file using the product ID and public key. This is the primary API method for licensed applications to verify their license status. The method automatically locates the license file based on the executable path and validates the cryptographic signature, expiration, and product identity. ### Method `LicenseFile.IsLicenseValid` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp using LicenseManager_12noon.Client; using Standard.Licensing; // Constants from License Manager X application const string PRODUCT_ID = "My Product ID"; const string PUBLIC_KEY = @"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE8rVkInZuKd56LlNb9vTqcSaAD8hwsc/iMn++wHppvyOfNexHnid+03PcKTn6MwXwv7D43fmqZtbYGSmccNA1cQ=="; LicenseFile license = new(); bool isValid = license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages); if (!isValid) { // License validation failed Console.WriteLine($"License invalid: {messages}"); // Options: terminate application, limit features, or prompt for valid license return; } // License is valid - access license properties Console.WriteLine($"Licensed to: {license.Name} ({license.Email})"); Console.WriteLine($"Product: {license.Product} v{license.Version}"); Console.WriteLine($"License Type: {license.StandardOrTrial}"); Console.WriteLine($"Quantity: {license.Quantity}"); // Check expiration if (license.ExpirationDays > 0) { Console.WriteLine($"Expires: {license.ExpirationDateUTC:D} ({license.ExpirationDays} days remaining)"); } else { Console.WriteLine("License: Perpetual (no expiration)"); } // Implement feature restrictions for trial licenses if (license.StandardOrTrial == LicenseType.Trial) { Console.WriteLine("Running in trial mode - some features are limited"); // Disable premium features for trial users } ``` ### Response #### Success Response (200) - **isValid** (bool) - True if the license is valid, false otherwise. - **messages** (string) - Detailed messages regarding the validation outcome (e.g., success, expiration, invalid signature). - **license** (LicenseFile object) - Contains properties like Name, Email, Product, Version, StandardOrTrial, Quantity, ExpirationDateUTC, ExpirationDays, IsLockedToAssembly if validation is successful. #### Response Example ```json { "isValid": true, "messages": "License validated successfully.", "license": { "Name": "John Doe", "Email": "john.doe@example.com", "Product": "My Product", "Version": "1.0.0", "StandardOrTrial": "Standard", "Quantity": 1, "ExpirationDateUTC": "2024-12-31T23:59:59Z", "ExpirationDays": 365, "IsLockedToAssembly": false } } ``` ``` -------------------------------- ### Validate Custom License Path with IsThisLicenseValid Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Validates a license file at a specific file path and optionally checks against a specific assembly path. ```csharp using LicenseManager_12noon.Client; const string PRODUCT_ID = "Enterprise App"; const string PUBLIC_KEY = @"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."; LicenseFile license = new(); // Validate license at specific paths string licensePath = @"C:\ProgramData\MyApp\license.lic"; string assemblyPath = @"C:\Program Files\MyApp\MyApp.exe"; bool isValid = license.IsThisLicenseValid( PRODUCT_ID, PUBLIC_KEY, licensePath, assemblyPath, out string messages ); if (isValid) { Console.WriteLine($"License validated successfully"); Console.WriteLine($"Locked to assembly: {license.IsLockedToAssembly}"); } else { Console.WriteLine($"Validation failed: {messages}"); } ``` -------------------------------- ### LicenseFile Properties Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Access properties on the LicenseFile object after validation. ```APIDOC ## LicenseFile Properties ### Description Properties available on the LicenseFile object after calling IsLicenseValid. ### Properties - **StandardOrTrial** (LicenseType) - License type. - **ExpirationDateUTC** (DateTime) - UTC expiration date. - **ExpirationDays** (int) - Days until expiration. - **Quantity** (int) - Seat count. - **Product** (string) - Product name. - **Version** (string) - Product version. - **PublishDate** (DateOnly?) - Publish date. - **Name/Email/Company** (string) - Licensee details. - **IsLockedToAssembly** (bool) - Lock status. - **ProductFeatures** (Dictionary) - Custom features. - **LicenseAttributes** (Dictionary) - Custom attributes. ``` -------------------------------- ### Licensee Information Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Information about the licensee that can be displayed by the licensed application. ```APIDOC ## Licensee Information This information can be displayed by the licensed application. | Property | Usage | |----------|-------| | Name | Name of the licensee | | Email | Email of the licensee | | Company | Company of the licensee (optional) | ``` -------------------------------- ### License Attributes Source: https://github.com/12noonllc/licensemanagerx/blob/main/README.md Custom attributes can be added to licenses using the key=value format to define additional properties. ```APIDOC ## License Attributes License attributes can be added using the `key=value` format to define additional properties for the license. ### Adding Attributes 1. In the **License attributes** field, enter your custom attribute in the `key=value` format. 2. Add as many attributes as needed, each on a new line. 3. Save the license file to apply the changes. ### Example | Key=Value | |-----------------| | Region=US | | SupportLevel=Premium | The licensed application can access these attributes to enforce specific behaviors or display relevant information. ``` -------------------------------- ### LicenseFile.IsThisLicenseValid Source: https://context7.com/12noonllc/licensemanagerx/llms.txt Validates a license file at a specified custom path and optionally checks for assembly locking against a specific assembly path. This method provides more control over license file location and assembly validation. ```APIDOC ## LicenseFile.IsThisLicenseValid ### Description Validates a specific license file at a custom path with explicit assembly path for locked licenses. Use this method when the license file is not in the default location or when you need to validate against a specific assembly. ### Method `LicenseFile.IsThisLicenseValid` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp using LicenseManager_12noon.Client; const string PRODUCT_ID = "Enterprise App"; const string PUBLIC_KEY = @"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE..."; LicenseFile license = new(); // Validate license at specific paths string licensePath = @"C:\ProgramData\MyApp\license.lic"; string assemblyPath = @"C:\Program Files\MyApp\MyApp.exe"; bool isValid = license.IsThisLicenseValid( PRODUCT_ID, PUBLIC_KEY, licensePath, assemblyPath, out string messages ); if (isValid) { Console.WriteLine($"License validated successfully"); Console.WriteLine($"Locked to assembly: {license.IsLockedToAssembly}"); } else { Console.WriteLine($"Validation failed: {messages}"); } ``` ### Response #### Success Response (200) - **isValid** (bool) - True if the license is valid, false otherwise. - **messages** (string) - Detailed messages regarding the validation outcome. - **license** (LicenseFile object) - Contains properties like Name, Email, Product, Version, StandardOrTrial, Quantity, ExpirationDateUTC, ExpirationDays, IsLockedToAssembly if validation is successful. #### Response Example ```json { "isValid": true, "messages": "License validated successfully against specified paths.", "license": { "Name": "Enterprise Client", "Email": "client@example.com", "Product": "Enterprise App", "Version": "2.0.0", "StandardOrTrial": "Standard", "Quantity": 5, "ExpirationDateUTC": "2025-01-01T00:00:00Z", "ExpirationDays": 730, "IsLockedToAssembly": true } } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.