public void Update(sys element) { if (element.m_addr.HasValue == true) { this.addr = element.addr; } if (element.m_arch != null) { this.arch = element.arch; } if (element.m_bus.HasValue == true) { this.bus = element.bus; } if (element.m_cmd != null) { this.cmd = element.cmd; } if (element.m_dist != null) { this.dist = element.dist; } if (element.m_id != null) { this.id = element.id; } if (element.m_iid != null) { this.iid = element.iid; } if (element.m_informall.HasValue == true) { this.informall = element.informall; } if (element.m_oid != null) { this.oid = element.oid; } if (element.m_port.HasValue == true) { this.port = element.port; } if (element.m_val.HasValue == true) { this.val = element.val; } if (element.m_valA.HasValue == true) { this.valA = element.valA; } if (element.m_valB.HasValue == true) { this.valB = element.valB; } }
public static sys Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { sys _sys = new sys(); _sys.m_rocrailClient = rocrailClient; _sys.m_addr = (int?)xml.Attribute("addr"); _sys.m_arch = (string)xml.Attribute("arch"); _sys.m_bus = (int?)xml.Attribute("bus"); _sys.m_cmd = (string)xml.Attribute("cmd"); _sys.m_dist = (string)xml.Attribute("dist"); _sys.m_id = (string)xml.Attribute("id"); _sys.m_iid = (string)xml.Attribute("iid"); _sys.m_informall = (bool?)xml.Attribute("informall"); _sys.m_oid = (string)xml.Attribute("oid"); _sys.m_port = (int?)xml.Attribute("port"); _sys.m_val = (int?)xml.Attribute("val"); _sys.m_valA = (int?)xml.Attribute("valA"); _sys.m_valB = (int?)xml.Attribute("valB"); return(_sys); }