Beispiel #1
0
        /// <inheritdoc/>
        /// <summary>
        /// Initialize a new instance of the <see cref = "DmiClassCollection"/> class.
        /// </summary>
        /// <param name="parent">Estructura.</param>
        internal DmiClassCollection(DmiStructure parent) : base(new List <DmiClass>())
        {
            SmbiosStructureCollection structures = parent.Context.Get((SmbiosStructure)(int)parent.Class);

            foreach (var structure in structures)
            {
                Items.Add(new DmiClass(DmiStructureFactory.Create(structure, parent.Context.Version)));
            }
        }
Beispiel #2
0
        /// <inheritdoc />
        /// <summary>
        /// Initialize a new instance of the <see cref = "T:iTin.Core.Hardware.Specification.Dmi.DmiClassCollection" /> class.
        /// </summary>
        /// <param name="parent">Estructura.</param>
        internal DmiClassCollection(DmiStructure parent) : base(new List <DmiClass>())
        {
            SMBIOS smbios        = DmiHelper.Smbios;
            int    smbiosVersion = smbios.Version;
            SmbiosStructureCollection structures = smbios.Get((SmbiosStructure)(int)parent.Class);

            foreach (var structure in structures)
            {
                Items.Add(new DmiClass(DmiStructureFactory.Create(structure, smbiosVersion)));
            }
        }