Esempio n. 1
0
        private CpuInfoCollection GetCpuSettings()
        {
            var collection = new CpuInfoCollection();

            collection.Open(ConfigurationProvider.CpuSettingsFile);
            return(collection);
        }
Esempio n. 2
0
        public CpuDetailResponse[] GetCpus()
        {
            var responseList = new List <CpuDetailResponse>();

            var collection = new CpuInfoCollection();

            collection.Open(ConfigurationProvider.CpuSettingsFile);

            var cpuNames = GetCpuNames();

            foreach (var name in cpuNames)
            {
                var cpu       = collection.FindByName(name);
                var cpuDetail = _cpuWrapper.GetCpuByName(cpu);
                responseList.Add(cpuDetail);
            }

            return(responseList.OrderBy(c => c.Name).ToArray());
        }