NServiceBus.LicenseLocationConventions.LoadLicenseFromPreviousRegistryLocation C# (CSharp) Method

LoadLicenseFromPreviousRegistryLocation() static private method

static private LoadLicenseFromPreviousRegistryLocation ( string version ) : string
version string
return string
        static string LoadLicenseFromPreviousRegistryLocation(string version)
        {
            var hkcuLicense = GetHKCULicense(subKey: version);

            if (!string.IsNullOrEmpty(hkcuLicense))
            {
                Logger.InfoFormat(@"Using embedded license found in registry [HKEY_CURRENT_USER\Software\NServiceBus\{0}\License].", version);

                return hkcuLicense;
            }

            var hklmLicense = GetHKLMLicense(subKey: version);
            if (!string.IsNullOrEmpty(hklmLicense))
            {
                Logger.InfoFormat(@"Using embedded license found in registry [HKEY_LOCAL_MACHINE\Software\NServiceBus\{0}\License].", version);

                return hklmLicense;
            }

            return null;
        }