Beispiel #1
0
        private IEnumerable <COMTypeLibVersionEntry> LoadFromLocales(string name, string version, RegistryKey key)
        {
            List <COMTypeLibVersionEntry> entries = new List <COMTypeLibVersionEntry>();

            foreach (string locale in key.GetSubKeyNames())
            {
                int locale_int;
                if (int.TryParse(locale, out locale_int))
                {
                    using (RegistryKey subkey = key.OpenSubKey(locale))
                    {
                        if (subkey != null)
                        {
                            COMTypeLibVersionEntry entry = new COMTypeLibVersionEntry(m_registry,
                                                                                      name, version, TypelibId, locale_int, subkey);
                            if (!string.IsNullOrWhiteSpace(entry.NativePath))
                            {
                                entries.Add(entry);
                            }
                        }
                    }
                }
            }
            return(entries);
        }
Beispiel #2
0
        public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return(true);
            }

            COMTypeLibVersionEntry right = obj as COMTypeLibVersionEntry;

            if (right == null)
            {
                return(false);
            }

            return(Version == right.Version && Name == right.Name &&
                   Win32Path == right.Win32Path && Win64Path == right.Win64Path && Locale == right.Locale &&
                   Source == right.Source);
        }