NServiceBus.LicenseLocationConventions.LoadLicenseFromRegistry C# (CSharp) Method

LoadLicenseFromRegistry() static private method

static private LoadLicenseFromRegistry ( ) : string
return string
        static string LoadLicenseFromRegistry()
        {
            var hkcuLicense = GetHKCULicense(@"ParticularSoftware\NServiceBus");

            if (!string.IsNullOrEmpty(hkcuLicense))
            {
                Logger.Info(@"Using embedded license found in registry [HKEY_CURRENT_USER\Software\ParticularSoftware\NServiceBus\License].");

                return hkcuLicense;
            }

            var hklmLicense = GetHKLMLicense(@"ParticularSoftware\NServiceBus");
            if (!string.IsNullOrEmpty(hklmLicense))
            {
                Logger.Info(@"Using embedded license found in registry [HKEY_LOCAL_MACHINE\Software\ParticularSoftware\NServiceBus\License].");

                return hklmLicense;
            }

            return null;
        }