コード例 #1
0
        /// <summary>
        ///     Indicates if the structure implements the interface provided as parameter
        /// </summary>
        /// <param name="anInterface"></param>
        /// <returns></returns>
        public bool InterfaceIsInherited(Structure anInterface)
        {
            bool retVal = false;

            if (anInterface.IsAbstract && anInterface != this)
            {
                retVal = ImplementedStructures.Contains(anInterface);
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Gets the data of the specified structure.
        /// </summary>
        /// <param name="structure">Structure to be recovered.</param>
        /// <returns>
        /// Collection of structures.
        /// </returns>
        public SmbiosStructureCollection Get(SmbiosStructure structure)
        {
            bool implementedStructure = ImplementedStructures.Contains(structure);

            if (!implementedStructure)
            {
                return(null);
            }

            SmbiosStructuresCache cache         = SmbiosStructuresCache.Cache;
            SmbiosStructureInfo   structureInfo = new SmbiosStructureInfo(structure, Version);

            return(cache.Get(structureInfo));
        }