ZooClientParameters
ReferencesZooClientParameters is a read-only set of parameters that control the flow of licensing inside ZooClient. Because this class flows through a number of other classes, functions, and UI, it is read-only so that inadvertent changes are not made to the data as it propagates from the caller.
Constructors
public ZooClientParameters(Guid productGuid, Guid licenseGuid, string productTitle, int productBuildType, LicenseCapabilities capabilities, string licenseEntryTextMask, string productPath, object parentWindow, LicenseTypes selectedLicenseType, ValidateProductKeyDelegate validateProductKey, OnLeaseChangedDelegate onLeaseChangedDelegate, VerifyLicenseKeyDelegate verifyLicenseKeyDelegate, VerifyPreviousVersionLicenseDelegate verifyPreviousVersionLicenseKeyDelegate)
ZooClientParameters Constructor
Parameters:
| productGuid (Guid) | Guid used by ZooClient to identify the plug-in requesting a license from ZooClient. This Guid may be used by different versions of the plug-in. If different licenses are used by different versions of the plug-in, the plug-in must also specify a LicenseGuid. |
| licenseGuid (Guid) | Guid used by ZooClient to identify the license saved by ZooClient. This differs from ProductGuid because different versions of a plug-in with the same Plug-in ID may need different licenses. |
| productTitle (string) | Title of product displayed in user interface |
| productBuildType (int) | |
| capabilities (LicenseCapabilities) | Enum that declares whether this product supports evalation, licensing, purchasing, and cloud zoo |
| licenseEntryTextMask (string) | Text mask used to limit input. EG: RH50-AAAA-AAAA-AAAA-AAAA-AAAA |
| productPath (string) | Full path to DLL implementing product |
| parentWindow (object) | Object used to parent UI DLLs |
| selectedLicenseType (LicenseTypes) | Type of license currently used by this product |
| validateProductKey (ValidateProductKeyDelegate) | Delegate called to validate the structure of a license key |
| onLeaseChangedDelegate (OnLeaseChangedDelegate) | Delegate called when a cloud zoo lease changes |
| verifyLicenseKeyDelegate (VerifyLicenseKeyDelegate) | Delegate called to verify the structure of a license key |
| verifyPreviousVersionLicenseKeyDelegate (VerifyPreviousVersionLicenseDelegate) | Delegate called to verify the structure of an upgrade license key |
Properties
LicenseCapabilities flags that set options for how licenses can be obtained for this product
Text mask in the form @"RH4A-AAAA-AAAA-AAAA-AAAA-AAAA" that informs the user what numbers they are looking for
Guid used by ZooClient to identify the license saved by ZooClient. This differs from ProductGuid because different versions of a plug-in with the same Plug-in ID may need different licenses.
Delegate called by ZooClient when a cloud zoo lease is changed
Parent window assigned to any licensing dialogs that appear. If null, the Rhino main window is used.
Product build type. Must be one of LicenseBuildType values.
Guid used by ZooClient to identify the plug-in requesting a license from ZooClient. This Guid may be used by different versions of the plug-in. If different licenses are used by different versions of the plug-in, the plug-in must also specify a LicenseGuid.
Title of the product, "Rhinoceros 6" for example.
License type selected by default when user is prompted to enter a license key
Methods
public ValidateResult VerifyLicenseKey(string licenseKey, string validationCode, DateTime validationCodeInstallDate, bool gracePeriodExpired, out LicenseData licenseData)
Called by GetLicense to ensure that the license key entered by the user is legitimate and can be used.
Parameters:
| licenseKey (string) | License key string entered by user |
| validationCode (string) | Validation code entered by user (only if a previous call to VerifyLicenseKey set LicenseData.RequiresOnlineValidation to true). |
| validationCodeInstallDate (DateTime) | Date that validation code was entered by user (only if a previous call to VerifyLicenseKey set LicenseData.RequiresOnlineValidation to true). |
| gracePeriodExpired (bool) | Date by which license validation must complete successfully. |
| licenseData (out LicenseData) | Output parameter where return data about the license is set. |
public bool VerifyPreviousVersionLicense(string license, string previousVersionLicense, out string errorMessage)
When a caller calls GetLicense, ZooClient may call VerifyPreviousVersionLicense to ensure previousVersionLicense is legitimate and can be used to upgrade license.
Parameters:
| license (string) | License key for current product. This was returned by a previous call to VerifyLicenseKey or ValidateProductKey. |
| previousVersionLicense (string) | License key entered by user to show upgrade eligibility for license. |
| errorMessage (out string) | Error message to be displayed to user if something isn't correct. |