public static r2rnet Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient) { r2rnet _r2rnet = new r2rnet(); _r2rnet.m_rocrailClient = rocrailClient; _r2rnet.m_addr = (string)xml.Attribute("addr"); _r2rnet.m_enable = (bool?)xml.Attribute("enable"); _r2rnet.m_id = (string)xml.Attribute("id"); _r2rnet.m_port = (int?)xml.Attribute("port"); _r2rnet.m_routes = (string)xml.Attribute("routes"); return(_r2rnet); }
public void Update(r2rnet element) { if (element.m_addr != null) { this.addr = element.addr; } if (element.m_enable.HasValue == true) { this.enable = element.enable; } if (element.m_id != null) { this.id = element.id; } if (element.m_port.HasValue == true) { this.port = element.port; } if (element.m_routes != null) { this.routes = element.routes; } }