コード例 #1
0
ファイル: IAttributeList.cs プロジェクト: IzabellaKlara/DM
        public object Clone()
        {
            IAttributeList TargetAttributeList = new IAttributeList();

            foreach (Attribute attribute in AttributeList)
            {
                TargetAttributeList.Add(attribute);
            }

            return(TargetAttributeList.Count() > 0 ?
                   (IAttributeList)TargetAttributeList.Clone() : null);
        }
コード例 #2
0
        public object Clone()
        {
            Item           TargetItem          = (Item)this.MemberwiseClone();
            IAttributeList TargetAttributeList = new IAttributeList();

            foreach (Attribute attribute in this.AttributeList)
            {
                TargetAttributeList.Add(attribute);
            }

            if (TargetAttributeList.Count() > 0)
            {
                TargetItem.AttributeList = (IAttributeList)TargetAttributeList.Clone();
            }

            TargetItem.IsCentroid = this.IsCentroid;
            TargetItem.Exists     = this.Exists;
            TargetItem.ItemText   = this.ItemText;
            TargetItem.Distance   = this.Distance;

            return(TargetItem);
        }