OleViewDotNet.COMRegistry.LoadAppIDs C# (CSharp) Method

LoadAppIDs() private method

private LoadAppIDs ( RegistryKey rootKey ) : void
rootKey Microsoft.Win32.RegistryKey
return void
        private void LoadAppIDs(RegistryKey rootKey)
        {
            m_appid = new SortedDictionary<Guid, COMAppIDEntry>();

            using (RegistryKey appIdKey = rootKey.OpenSubKey("AppID"))
            {
                if (appIdKey != null)
                {
                    string[] subkeys = appIdKey.GetSubKeyNames();
                    foreach (string key in subkeys)
                    {
                        Guid appid;

                        if (Guid.TryParse(key, out appid))
                        {
                            if (!m_appid.ContainsKey(appid))
                            {
                                using (RegistryKey regKey = appIdKey.OpenSubKey(key))
                                {
                                    if (regKey != null)
                                    {
                                        COMAppIDEntry ent = new COMAppIDEntry(appid, regKey);

                                        m_appid.Add(appid, ent);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }