public void AddDeviceDriver(DeviceDriver deviceDriver)
 {
     deviceDrivers.AddLast(deviceDriver);
 }
        /// <summary>
        /// Registers the device drivers.
        /// </summary>
        /// <param name="assemblyInfo">The assembly info.</param>
        public void RegisterDeviceDrivers(Assembly assemblyInfo)
        {
            var types = assemblyInfo.DefinedTypes;

            foreach (var type in types)
            {
                var attributes = type.CustomAttributes;

                foreach (var attributeData in attributes)
                {
                    if (attributeData.AttributeType != typeof(ISADeviceDriverAttribute) &&
                        attributeData.AttributeType != typeof(PCIDeviceDriverAttribute))
                        continue;

                    var attribute = GetIDeviceDriver(attributeData);

                    if ((attribute.Platforms & platformArchitecture) != 0)
                    {
                        var deviceDriver = new DeviceDriver(attribute, type.AsType());

                        foreach (var memAttributeData in attributes)
                        {
                            if (memAttributeData.AttributeType != typeof(DeviceDriverPhysicalMemoryAttribute))
                                continue;

                            var memAttribute = GetDeviceDriverPhysicalMemoryAttribute(memAttributeData);

                            deviceDriver.Add(memAttribute);
                        }

                        AddDeviceDriver(deviceDriver);
                    }
                }
            }
        }