Exemplo n.º 1
0
        public static rocnetnode Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            rocnetnode _rocnetnode = new rocnetnode();

            _rocnetnode.m_rocrailClient = rocrailClient;
            _rocnetnode.m_class         = (string)xml.Attribute("class");
            _rocnetnode.m_id            = (int?)xml.Attribute("id");
            _rocnetnode.m_location      = (int?)xml.Attribute("location");
            _rocnetnode.m_mnemonic      = (string)xml.Attribute("mnemonic");
            _rocnetnode.m_nrio          = (int?)xml.Attribute("nrio");
            _rocnetnode.m_revision      = (int?)xml.Attribute("revision");
            _rocnetnode.m_subip         = (int?)xml.Attribute("subip");
            _rocnetnode.m_vendor        = (int?)xml.Attribute("vendor");
            _rocnetnode.m_version       = (string)xml.Attribute("version");
            return(_rocnetnode);
        }
Exemplo n.º 2
0
 public void Update(rocnetnode element)
 {
     if (element.m_class != null)
     {
         this.@class = element.@class;
     }
     if (element.m_id.HasValue == true)
     {
         this.id = element.id;
     }
     if (element.m_location.HasValue == true)
     {
         this.location = element.location;
     }
     if (element.m_mnemonic != null)
     {
         this.mnemonic = element.mnemonic;
     }
     if (element.m_nrio.HasValue == true)
     {
         this.nrio = element.nrio;
     }
     if (element.m_revision.HasValue == true)
     {
         this.revision = element.revision;
     }
     if (element.m_subip.HasValue == true)
     {
         this.subip = element.subip;
     }
     if (element.m_vendor.HasValue == true)
     {
         this.vendor = element.vendor;
     }
     if (element.m_version != null)
     {
         this.version = element.version;
     }
 }