private static void LicenseScheduledCheck() { if (version.IsAGPL()) { return; } String licenseKeyProductFullName = "iText.License.LicenseKeyProduct, itext.licensekey"; String checkLicenseKeyMethodName = "ScheduledCheck"; try { Type licenseKeyClass = GetLicenseKeyClass(); Type licenseKeyProductClass = GetClassFromLicenseKey(licenseKeyProductFullName); Type[] cArg = new Type[] { licenseKeyProductClass }; MethodInfo method = licenseKeyClass.GetMethod(checkLicenseKeyMethodName, cArg); method.Invoke(null, new Object[] { null }); } catch (Exception e) { throw new Exception(e.Message, e); } }
public virtual void IsAGPLFalseTest() { iText.Kernel.Version customVersion = new iText.Kernel.Version(new VersionInfo("iText®", "7.5.1-SNAPSHOT", "iText® 7.5.1-SNAPSHOT ©2000-2090 iText Group NV", null), false); NUnit.Framework.Assert.IsFalse(customVersion.IsAGPL()); }