internal static void Verify() { //only do this if not been configured by the fluent API if (licenseText == null) { licenseText = LicenseLocationConventions.TryFindLicenseText(); if (string.IsNullOrWhiteSpace(licenseText)) { ConfigureNServiceBusToRunInTrialMode(); return; } } SignedXmlVerifier.VerifyXml(licenseText); var tempLicense = LicenseDeserializer.Deserialize(licenseText); string message; if (LicenseDowngrader.ShouldLicenseDowngrade(tempLicense, out message)) { message = message + " You can renew it at http://particular.net/licensing. Downgrading to basic mode"; Logger.Warn(message); license = LicenseDeserializer.GetBasicLicense(); } else { license = tempLicense; } WriteLicenseInfo(); }
static string GetExistingLicense() { string existingLicense; //look in HKCU if (UserSidChecker.IsNotSystemSid() && new RegistryLicenseStore().TryReadLicense(out existingLicense)) { return(existingLicense); } //look in HKLM if (new RegistryLicenseStore(Registry.LocalMachine).TryReadLicense(out existingLicense)) { return(existingLicense); } return(LicenseLocationConventions.TryFindLicenseText()); }