public void load(xElement element) { if (element == null) { throw new ArgumentNullException("element"); } loadFields(element.Elements("field")); loadEntries(element.Elements("entry")); }
WaveGroup LoadWaveGroup(xElement xwavegroup) { var waveGroup = new WaveGroup(); var xarchive = xwavegroup.Attribute(cWaveArchive); if (xarchive == null) { mareep.WriteWarning("XML: line #{0}: missing archive attribute\n", xwavegroup.LineNumber); return(null); } waveGroup.ArchiveFileName = xarchive.Value; foreach (var xwave in xwavegroup.Elements(cWave)) { var wave = LoadWave(xwave); if (wave != null) { waveGroup.Add(wave); } } return(waveGroup); }
WaveBank LoadWaveBank(xElement xwavebank) { var waveBank = new WaveBank(); var xname = xwavebank.Attribute("name"); if (xname == null) { waveBank.Name = mName; } else { waveBank.Name = xname.Value; } foreach (var xwavegroup in xwavebank.Elements(cWaveGroup)) { var waveGroup = LoadWaveGroup(xwavegroup); if (waveGroup != null) { waveBank.Add(waveGroup); } } return(waveBank); }
WaveBank LoadWaveBank(xElement xwavebank) { var waveBank = new WaveBank(); foreach (var xwavegroup in xwavebank.Elements(cWaveGroup)) { var waveGroup = LoadWaveGroup(xwavegroup); if (waveGroup != null) { waveBank.Add(waveGroup); } } return(waveBank); }