Ejemplo n.º 1
0
        private static List <RegisteredBrowserLinkModule> FindAllBrowserLinkModules()
        {
            List <RegisteredBrowserLinkModule> runtimes = new List <RegisteredBrowserLinkModule>();

            foreach (string registryKeyPath in BrowserLinkRegistryKeys)
            {
                RegistryKey rootKey = Registry.LocalMachine.OpenSubKey(registryKeyPath);
                if (rootKey != null)
                {
                    foreach (string subKeyName in rootKey.GetSubKeyNames())
                    {
                        RegistryKey subKey = rootKey.OpenSubKey(subKeyName);

                        if (subKey != null)
                        {
                            RegisteredBrowserLinkModule runtime = ReadModuleInformation(subKeyName, subKey);

                            if (runtime != null)
                            {
                                runtimes.Add(runtime);
                            }
                        }
                    }
                }
            }

            return(runtimes);
        }
Ejemplo n.º 2
0
 private static int CompareBrowserLinkModulesByVersion(RegisteredBrowserLinkModule x, RegisteredBrowserLinkModule y)
 {
     // Sort in reverse order of version
     return(y.Version.CompareTo(x.Version));
 }