Mosa.HardwareSystem.DeviceDriverRegistry.GetDeviceDriverPhysicalMemoryAttribute C# (CSharp) Method

GetDeviceDriverPhysicalMemoryAttribute() private method

private GetDeviceDriverPhysicalMemoryAttribute ( CustomAttributeData attributeData ) : DeviceDriverPhysicalMemoryAttribute
attributeData System.Reflection.CustomAttributeData
return DeviceDriverPhysicalMemoryAttribute
        private DeviceDriverPhysicalMemoryAttribute GetDeviceDriverPhysicalMemoryAttribute(CustomAttributeData attributeData)
        {
            var attribute = new DeviceDriverPhysicalMemoryAttribute();
            foreach (var arg in attributeData.NamedArguments)
            {
                if (arg.MemberName == "MemorySize")
                    attribute.MemorySize = (uint)arg.TypedValue.Value;
                else if (arg.MemberName == "MemoryAlignment")
                    attribute.MemoryAlignment = (uint)arg.TypedValue.Value;
                else if (arg.MemberName == "RestrictUnder16M")
                    attribute.RestrictUnder16M = (bool)arg.TypedValue.Value;
                else if (arg.MemberName == "RestrictUnder4G")
                    attribute.RestrictUnder4G = (bool)arg.TypedValue.Value;
            }
            return attribute;
        }