public static cbnode Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { cbnode _cbnode = new cbnode(); _cbnode.m_rocrailClient = rocrailClient; _cbnode.m_canid = (int?)xml.Attribute("canid"); _cbnode.m_manuid = (int?)xml.Attribute("manuid"); _cbnode.m_mtyp = (int?)xml.Attribute("mtyp"); _cbnode.m_nr = (int?)xml.Attribute("nr"); _cbnode.m_nrevt = (int?)xml.Attribute("nrevt"); _cbnode.m_nrevtvar = (int?)xml.Attribute("nrevtvar"); _cbnode.m_nrvar = (int?)xml.Attribute("nrvar"); _cbnode.m_version = (string)xml.Attribute("version"); Definitions.Tools.ParseList <cbnodeevent>(_cbnode.m_cbnodeeventlist, xml, "cbnodeevent", cbnodeevent.Parse, rocrailClient); Definitions.Tools.ParseList <cbnodevar>(_cbnode.m_cbnodevarlist, xml, "cbnodevar", cbnodevar.Parse, rocrailClient); return(_cbnode); }
public void Update(cbnode element) { if (element.m_canid.HasValue == true) { this.canid = element.canid; } if (element.m_manuid.HasValue == true) { this.manuid = element.manuid; } if (element.m_mtyp.HasValue == true) { this.mtyp = element.mtyp; } if (element.m_nr.HasValue == true) { this.nr = element.nr; } if (element.m_nrevt.HasValue == true) { this.nrevt = element.nrevt; } if (element.m_nrevtvar.HasValue == true) { this.nrevtvar = element.nrevtvar; } if (element.m_nrvar.HasValue == true) { this.nrvar = element.nrvar; } if (element.m_version != null) { this.version = element.version; } this.cbnodeeventlist = element.cbnodeeventlist; this.cbnodevarlist = element.cbnodevarlist; }