示例#1
0
        public static rocrail Parse(System.Xml.Linq.XElement xml, CRocrailClient rocrailClient)
        {
            rocrail _rocrail = new rocrail();

            _rocrail.m_rocrailClient       = rocrailClient;
            _rocrail.m_backup              = (bool?)xml.Attribute("backup");
            _rocrail.m_backuppath          = (string)xml.Attribute("backuppath");
            _rocrail.m_createmodplan       = (bool?)xml.Attribute("createmodplan");
            _rocrail.m_doneml              = (string)xml.Attribute("doneml");
            _rocrail.m_donkey              = (string)xml.Attribute("donkey");
            _rocrail.m_dpiid               = (string)xml.Attribute("dpiid");
            _rocrail.m_file                = (string)xml.Attribute("file");
            _rocrail.m_fsutf8              = (bool?)xml.Attribute("fsutf8");
            _rocrail.m_imgpath             = (string)xml.Attribute("imgpath");
            _rocrail.m_issuepath           = (string)xml.Attribute("issuepath");
            _rocrail.m_keypath             = (string)xml.Attribute("keypath");
            _rocrail.m_lciid               = (string)xml.Attribute("lciid");
            _rocrail.m_libpath             = (string)xml.Attribute("libpath");
            _rocrail.m_locs                = (string)xml.Attribute("locs");
            _rocrail.m_nodevcheck          = (bool?)xml.Attribute("nodevcheck");
            _rocrail.m_occupancy           = (string)xml.Attribute("occupancy");
            _rocrail.m_planfile            = (string)xml.Attribute("planfile");
            _rocrail.m_poweroffonexit      = (bool?)xml.Attribute("poweroffonexit");
            _rocrail.m_ptiid               = (string)xml.Attribute("ptiid");
            _rocrail.m_resetspfx           = (bool?)xml.Attribute("resetspfx");
            _rocrail.m_runasroot           = (bool?)xml.Attribute("runasroot");
            _rocrail.m_sciid               = (string)xml.Attribute("sciid");
            _rocrail.m_scsensor            = (string)xml.Attribute("scsensor");
            _rocrail.m_soundpath           = (string)xml.Attribute("soundpath");
            _rocrail.m_soundplayer         = (string)xml.Attribute("soundplayer");
            _rocrail.m_soundplayerlocation = (bool?)xml.Attribute("soundplayerlocation");
            _rocrail.m_sviid               = (string)xml.Attribute("sviid");
            Definitions.Tools.ParseList <SnmpService>(_rocrail.m_SnmpServicelist, xml, "SnmpService", SnmpService.Parse, rocrailClient);
            Definitions.Tools.ParseList <anaopt>(_rocrail.m_anaoptlist, xml, "anaopt", anaopt.Parse, rocrailClient);
            Definitions.Tools.ParseList <clock>(_rocrail.m_clocklist, xml, "clock", clock.Parse, rocrailClient);
            Definitions.Tools.ParseList <ctrl>(_rocrail.m_ctrllist, xml, "ctrl", ctrl.Parse, rocrailClient);
            Definitions.Tools.ParseList <devices>(_rocrail.m_deviceslist, xml, "devices", devices.Parse, rocrailClient);
            Definitions.Tools.ParseList <digint>(_rocrail.m_digintlist, xml, "digint", digint.Parse, rocrailClient);
            Definitions.Tools.ParseList <http>(_rocrail.m_httplist, xml, "http", http.Parse, rocrailClient);
            Definitions.Tools.ParseList <jsmap>(_rocrail.m_jsmaplist, xml, "jsmap", jsmap.Parse, rocrailClient);
            Definitions.Tools.ParseList <r2rnet>(_rocrail.m_r2rnetlist, xml, "r2rnet", r2rnet.Parse, rocrailClient);
            Definitions.Tools.ParseList <service>(_rocrail.m_servicelist, xml, "service", service.Parse, rocrailClient);
            Definitions.Tools.ParseList <srcpcon>(_rocrail.m_srcpconlist, xml, "srcpcon", srcpcon.Parse, rocrailClient);
            Definitions.Tools.ParseList <tcp>(_rocrail.m_tcplist, xml, "tcp", tcp.Parse, rocrailClient);
            Definitions.Tools.ParseList <trace>(_rocrail.m_tracelist, xml, "trace", trace.Parse, rocrailClient);
            return(_rocrail);
        }
示例#2
0
 public void Update(rocrail element)
 {
     if (element.m_backup.HasValue == true)
     {
         this.backup = element.backup;
     }
     if (element.m_backuppath != null)
     {
         this.backuppath = element.backuppath;
     }
     if (element.m_createmodplan.HasValue == true)
     {
         this.createmodplan = element.createmodplan;
     }
     if (element.m_doneml != null)
     {
         this.doneml = element.doneml;
     }
     if (element.m_donkey != null)
     {
         this.donkey = element.donkey;
     }
     if (element.m_dpiid != null)
     {
         this.dpiid = element.dpiid;
     }
     if (element.m_file != null)
     {
         this.file = element.file;
     }
     if (element.m_fsutf8.HasValue == true)
     {
         this.fsutf8 = element.fsutf8;
     }
     if (element.m_imgpath != null)
     {
         this.imgpath = element.imgpath;
     }
     if (element.m_issuepath != null)
     {
         this.issuepath = element.issuepath;
     }
     if (element.m_keypath != null)
     {
         this.keypath = element.keypath;
     }
     if (element.m_lciid != null)
     {
         this.lciid = element.lciid;
     }
     if (element.m_libpath != null)
     {
         this.libpath = element.libpath;
     }
     if (element.m_locs != null)
     {
         this.locs = element.locs;
     }
     if (element.m_nodevcheck.HasValue == true)
     {
         this.nodevcheck = element.nodevcheck;
     }
     if (element.m_occupancy != null)
     {
         this.occupancy = element.occupancy;
     }
     if (element.m_planfile != null)
     {
         this.planfile = element.planfile;
     }
     if (element.m_poweroffonexit.HasValue == true)
     {
         this.poweroffonexit = element.poweroffonexit;
     }
     if (element.m_ptiid != null)
     {
         this.ptiid = element.ptiid;
     }
     if (element.m_resetspfx.HasValue == true)
     {
         this.resetspfx = element.resetspfx;
     }
     if (element.m_runasroot.HasValue == true)
     {
         this.runasroot = element.runasroot;
     }
     if (element.m_sciid != null)
     {
         this.sciid = element.sciid;
     }
     if (element.m_scsensor != null)
     {
         this.scsensor = element.scsensor;
     }
     if (element.m_soundpath != null)
     {
         this.soundpath = element.soundpath;
     }
     if (element.m_soundplayer != null)
     {
         this.soundplayer = element.soundplayer;
     }
     if (element.m_soundplayerlocation.HasValue == true)
     {
         this.soundplayerlocation = element.soundplayerlocation;
     }
     if (element.m_sviid != null)
     {
         this.sviid = element.sviid;
     }
     this.SnmpServicelist = element.SnmpServicelist;
     this.anaoptlist      = element.anaoptlist;
     this.clocklist       = element.clocklist;
     this.ctrllist        = element.ctrllist;
     this.deviceslist     = element.deviceslist;
     this.digintlist      = element.digintlist;
     this.httplist        = element.httplist;
     this.jsmaplist       = element.jsmaplist;
     this.r2rnetlist      = element.r2rnetlist;
     this.servicelist     = element.servicelist;
     this.srcpconlist     = element.srcpconlist;
     this.tcplist         = element.tcplist;
     this.tracelist       = element.tracelist;
 }