SDK integration
Decide whether work can run
The current state answers one product question: may the protected action continue?
The three states
Licensed
Run protected work normally.
Warning
Run protected work. Show the reason quietly and, when present, the time in Until.
Unlicensed
Do not run protected work. Show Reason and offer the recommended action.
Gate every protected action
var status = _license.Status;
if (status.State == LicenseState.Unlicensed)
{
ShowLicenseMessage(status.Reason);
return;
}
RunProtectedWork(); // Licensed and Warning both allow workRead the current status where the protected command or solve begins.
Present the decision
For Warning, let work continue and present the reason without turning it into a refusal. For Unlicensed, stop protected work, show Reason, and offer the recommended action.