LicensingSet | |
public static void SetLicense( string licenseOwner, string licenseType, string license )
SetLicense method sets the license parameters for the Ab4d.SharpEngine.
The parameter values for the commercial version can be retrieved from the User Account web page on ab4d.com or from the ab4d.com/trial for trial version.
Note that license is not checked immediately after calling this method.
Note that license is not checked immediately after calling this method.
If you are not referencing the Ab4d.SharpEngine from the entry assembly and you do not have an SDK license, then you can use the following code to call the SetLicense method using reflection.
var licensingType = Type.GetType("Ab4d.SharpEngine.Licensing, Ab4d.SharpEngine"); if (licensingType != null) { var setLicenseMethod = licensingType.GetMethod("SetLicense", BindingFlags.Public | BindingFlags.Static, new Type[] { typeof(string), typeof(string), typeof(string) }); if (setLicenseMethod != null) { var setLicenseParams = new object[] { /* licenseOwner: */ "AB4D", /* licenseType: */ "SamplesLicense", /* license: */ "5B53-8A17-DAEB-5B03-3B90-DD5B-958B-CA4D-0B88-CE79-FBB4-6002-D9C9-19C2-AFF8-1662-B2B2" }; setLicenseMethod.Invoke(null, setLicenseParams); } }