Exemple #1
0
        internal SLSharedItems Clone()
        {
            SLSharedItems sis = new SLSharedItems();

            sis.ContainsSemiMixedTypes = this.ContainsSemiMixedTypes;
            sis.ContainsNonDate        = this.ContainsNonDate;
            sis.ContainsDate           = this.ContainsDate;
            sis.ContainsString         = this.ContainsString;
            sis.ContainsBlank          = this.ContainsBlank;
            sis.ContainsMixedTypes     = this.ContainsMixedTypes;
            sis.ContainsNumber         = this.ContainsNumber;
            sis.ContainsInteger        = this.ContainsInteger;
            sis.MinValue = this.MinValue;
            sis.MaxValue = this.MaxValue;
            sis.MinDate  = this.MinDate;
            sis.MaxDate  = this.MaxDate;
            //count
            sis.LongText = this.LongText;

            sis.Items = new List <SLSharedGroupItemsTypeIndexPair>();
            foreach (SLSharedGroupItemsTypeIndexPair pair in this.Items)
            {
                sis.Items.Add(new SLSharedGroupItemsTypeIndexPair(pair.Type, pair.Index));
            }

            sis.MissingItems = new List <SLMissingItem>();
            foreach (SLMissingItem mi in this.MissingItems)
            {
                sis.MissingItems.Add(mi.Clone());
            }

            sis.NumberItems = new List <SLNumberItem>();
            foreach (SLNumberItem ni in this.NumberItems)
            {
                sis.NumberItems.Add(ni.Clone());
            }

            sis.BooleanItems = new List <SLBooleanItem>();
            foreach (SLBooleanItem bi in this.BooleanItems)
            {
                sis.BooleanItems.Add(bi.Clone());
            }

            sis.ErrorItems = new List <SLErrorItem>();
            foreach (SLErrorItem ei in this.ErrorItems)
            {
                sis.ErrorItems.Add(ei.Clone());
            }

            sis.StringItems = new List <SLStringItem>();
            foreach (SLStringItem si in this.StringItems)
            {
                sis.StringItems.Add(si.Clone());
            }

            sis.DateTimeItems = new List <SLDateTimeItem>();
            foreach (SLDateTimeItem dti in this.DateTimeItems)
            {
                sis.DateTimeItems.Add(dti.Clone());
            }

            return(sis);
        }
        internal SLSharedItems Clone()
        {
            SLSharedItems sis = new SLSharedItems();
            sis.ContainsSemiMixedTypes = this.ContainsSemiMixedTypes;
            sis.ContainsNonDate = this.ContainsNonDate;
            sis.ContainsDate = this.ContainsDate;
            sis.ContainsString = this.ContainsString;
            sis.ContainsBlank = this.ContainsBlank;
            sis.ContainsMixedTypes = this.ContainsMixedTypes;
            sis.ContainsNumber = this.ContainsNumber;
            sis.ContainsInteger = this.ContainsInteger;
            sis.MinValue = this.MinValue;
            sis.MaxValue = this.MaxValue;
            sis.MinDate = this.MinDate;
            sis.MaxDate = this.MaxDate;
            //count
            sis.LongText = this.LongText;

            sis.Items = new List<SLSharedGroupItemsTypeIndexPair>();
            foreach (SLSharedGroupItemsTypeIndexPair pair in this.Items)
            {
                sis.Items.Add(new SLSharedGroupItemsTypeIndexPair(pair.Type, pair.Index));
            }

            sis.MissingItems = new List<SLMissingItem>();
            foreach (SLMissingItem mi in this.MissingItems)
            {
                sis.MissingItems.Add(mi.Clone());
            }

            sis.NumberItems = new List<SLNumberItem>();
            foreach (SLNumberItem ni in this.NumberItems)
            {
                sis.NumberItems.Add(ni.Clone());
            }

            sis.BooleanItems = new List<SLBooleanItem>();
            foreach (SLBooleanItem bi in this.BooleanItems)
            {
                sis.BooleanItems.Add(bi.Clone());
            }

            sis.ErrorItems = new List<SLErrorItem>();
            foreach (SLErrorItem ei in this.ErrorItems)
            {
                sis.ErrorItems.Add(ei.Clone());
            }

            sis.StringItems = new List<SLStringItem>();
            foreach (SLStringItem si in this.StringItems)
            {
                sis.StringItems.Add(si.Clone());
            }

            sis.DateTimeItems = new List<SLDateTimeItem>();
            foreach (SLDateTimeItem dti in this.DateTimeItems)
            {
                sis.DateTimeItems.Add(dti.Clone());
            }

            return sis;
        }