Beispiel #1
0
 public void Update(datareq element)
 {
     if (element.m_cmd.HasValue == true)
     {
         this.cmd = element.cmd;
     }
     if (element.m_data != null)
     {
         this.data = element.data;
     }
     if (element.m_filename != null)
     {
         this.filename = element.filename;
     }
     if (element.m_function.HasValue == true)
     {
         this.function = element.function;
     }
     if (element.m_id != null)
     {
         this.id = element.id;
     }
     if (element.m_type.HasValue == true)
     {
         this.type = element.type;
     }
 }
Beispiel #2
0
        public static datareq Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            datareq _datareq = new datareq();

            _datareq.m_rocrailClient = rocrailClient;
            _datareq.m_cmd           = (int?)xml.Attribute("cmd");
            _datareq.m_data          = (string)xml.Attribute("data");
            _datareq.m_filename      = (string)xml.Attribute("filename");
            _datareq.m_function      = (int?)xml.Attribute("function");
            _datareq.m_id            = (string)xml.Attribute("id");
            _datareq.m_type          = (int?)xml.Attribute("type");
            return(_datareq);
        }