ScoobyRom.DataFile.RomXml.ParseValues C# (CSharp) Method

ParseValues() static private method

static private ParseValues ( System.Xml.Linq.XElement el, int &address, string &unit, TableType &tableType ) : void
el System.Xml.Linq.XElement
address int
unit string
tableType TableType
return void
        static void ParseValues(XElement el, out int? address, out string unit, out TableType? tableType)
        {
            address = null;
            unit = null;
            tableType = null;

            XAttribute attr = el.Attribute (X_address);
            if (attr != null)
                address = ParseHexInt ((string)attr, attr);

            attr = el.Attribute (X_tableType);
            if (attr != null) {
                TableType parsedType;
                if (TableTypes.TryParse ((string)attr, out parsedType))
                    tableType = parsedType;
            }

            unit = (string)el.Attribute (X_unit);
        }