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

            _isFiltered = (aSource as ActivityCollection)._isFiltered;
            _activityFilter = (aSource as ActivityCollection)._activityFilter;
            _activityList.Clear();
            foreach (Activity vActivitySource in (aSource as ActivityCollection)._activityList)
            {
                Activity vActivityTarget = new Activity();
                vActivityTarget.AssignFromSource(vActivitySource);
                _activityList.Add(vActivityTarget);
            }
        }
Esempio n. 2
0
        /// <summary>
        ///    Assigns all <c>aSource</c> object's values to this instance of <see cref="ActivityCollection"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is ActivityCollection))
            {
                throw new ArgumentException("Invalid assignment source", "ActivityCollection");
            }

            _isFiltered     = (aSource as ActivityCollection)._isFiltered;
            _activityFilter = (aSource as ActivityCollection)._activityFilter;
            _activityList.Clear();
            foreach (Activity vActivitySource in (aSource as ActivityCollection)._activityList)
            {
                Activity vActivityTarget = new Activity();
                vActivityTarget.AssignFromSource(vActivitySource);
                _activityList.Add(vActivityTarget);
            }
        }