Bloom.WebLibraryIntegration.BookDownloadSupport.AlreadyRegistered C# (CSharp) Method

AlreadyRegistered() private static method

private static AlreadyRegistered ( RegistryKey root ) : bool
root Microsoft.Win32.RegistryKey
return bool
        private static bool AlreadyRegistered(RegistryKey root)
        {
            var key = root.OpenSubKey(@"bloom\shell\open\command");
            if (key == null)
                return false;
            var wanted = CommandToLaunchBloomOnWindows;
            if (wanted != (key.GetValue("") as string).ToLowerInvariant())
                return false;
            key = root.OpenSubKey("bloom");
            if (key.GetValue("") as string != "BLOOM:URL Protocol")
                return false;
            if (key.GetValue("URL Protocol") as string != "")
                return false;
            return true;
        }