Tenantry ProAPI reference
ILicenseGuard interface
Namespace: Tenantry.Pro.Licensing · Package: Tenantry.Pro · API reference
Checks that a valid Tenantry.Pro licence is configured. A public seam so that public, provider-agnostic services (such as the EF Core provisioning services) can take the licence check in a public constructor, while the validator itself stays internal.
public interface ILicenseGuardMethods
EnsureLicensed(string)
Throws unless the configured licence key is valid: present, signed by Tenantry and well formed. The result is computed once, since the key does not change while the application runs.
void EnsureLicensed(string capability)Parameters:
capabilitystring: A short phrase naming the operation being guarded (e.g. "provision tenant databases"), used in the exception message.
Exceptions:
LicenseRequiredException: The licence key is missing or invalid.