public bool CopyTo(object obj) { if (!(obj is MonitorSysData)) { return(false); } MonitorSysData temp = (MonitorSysData)obj; temp.IsConfigInfoSame = this.IsConfigInfoSame; temp.IsCycleMonitor = this.IsCycleMonitor; temp.RetryReadTimes = this.RetryReadTimes; temp.MonitorPeriod = this.MonitorPeriod; temp.SameMonitorSysData = (OneDisplayMonitorSysData)this.SameMonitorSysData.Clone(); if (this.AllDisplayMonitorSysDataList == null) { temp.AllDisplayMonitorSysDataList = null; } else { temp.AllDisplayMonitorSysDataList = new List <OneDisplayMonitorSysData>(); for (int i = 0; i < this.AllDisplayMonitorSysDataList.Count; i++) { temp.AllDisplayMonitorSysDataList.Add((OneDisplayMonitorSysData)this.AllDisplayMonitorSysDataList[i].Clone()); } } return(true); }
public object Clone() { MonitorSysData newObj = new MonitorSysData(); bool res = this.CopyTo(newObj); if (!res) { return null; } else { return newObj; } }
public object Clone() { MonitorSysData newObj = new MonitorSysData(); bool res = this.CopyTo(newObj); if (!res) { return(null); } else { return(newObj); } }