예제 #1
0
        public virtual object Clone()
        {
            ScanBdMonitorInfo newObj = new ScanBdMonitorInfo();
            bool res = this.CopyTo(newObj);

            if (!res)
            {
                return(null);
            }
            else
            {
                return(newObj);
            }
        }
예제 #2
0
        public virtual bool CopyTo(object obj)
        {
            if (!(obj is ScanBdMonitorInfo))
            {
                return(false);
            }
            ScanBdMonitorInfo temp = (ScanBdMonitorInfo)obj;

            temp.CountType = this.CountType;
            temp.SameCount = this.SameCount;
            if (this.CountDicOfScanBd == null)
            {
                temp.CountDicOfScanBd = null;
            }
            else
            {
                temp.CountDicOfScanBd = new SerializableDictionary <string, byte>();
                foreach (string key in this.CountDicOfScanBd.Keys)
                {
                    temp.CountDicOfScanBd.Add(key, this.CountDicOfScanBd[key]);
                }
            }
            return(true);
        }