コード例 #1
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Return the list of possible seeds
        /// </summary>
        /// -----------------------------------------------------------------------------------
        public override IEnumerable <Seed> GetSeeds()
        {
            List <Seed> seeds = new List <Seed>();

            // Get a list of the current logical drives
            foreach (RegistryHive hive in RegistryHive.GetValues(typeof(RegistryHive)))
            {
                switch (hive.ToString())
                {
                //We don't need to add the 2 deprecated HIVES of dynData & Performance.
                case "DynData":
                case "PerformanceData":
                    break;

                default:
                    seeds.Add(new Seed {
                        Id = hive.ToString(), Name = "Registry Hive: " + hive.ToString(), TreeHandler = this
                    });
                    break;
                }
            }
            return(seeds);
        }