Example #1
0
        /// <summary>
        ///    Assigns all <c>aSource</c> object's values to this instance of <see cref="CellCollection"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is CellCollection))
            {
                throw new ArgumentException("Invalid assignment source", "CellCollection");
            }

            _isFiltered = (aSource as CellCollection)._isFiltered;
            _cellFilter = (aSource as CellCollection)._cellFilter;
            _cellList.Clear();
            foreach (Cell vCellSource in (aSource as CellCollection)._cellList)
            {
                Cell vCellTarget = new Cell();
                vCellTarget.AssignFromSource(vCellSource);
                _cellList.Add(vCellTarget);
            }
        }
Example #2
0
        /// <summary>
        ///    Assigns all <c>aSource</c> object's values to this instance of <see cref="CellCollection"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is CellCollection))
            {
                throw new ArgumentException("Invalid assignment source", "CellCollection");
            }

            _isFiltered = (aSource as CellCollection)._isFiltered;
            _cellFilter = (aSource as CellCollection)._cellFilter;
            _cellList.Clear();
            foreach (Cell vCellSource in (aSource as CellCollection)._cellList)
            {
                Cell vCellTarget = new Cell();
                vCellTarget.AssignFromSource(vCellSource);
                _cellList.Add(vCellTarget);
            }
        }