コード例 #1
0
ファイル: ExerciseFilter.cs プロジェクト: heinschulie/zfit
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is ExerciseFilter))
            {
                throw new ArgumentException("Invalid assignment source", "ExerciseFilter");
            }

            _exerciseFilter.AssignFromSource((aSource as ExerciseFilter)._exerciseFilter);
        }
コード例 #2
0
        /// <summary>
        ///    Assigns all <c>aSource</c> object's values to this instance of <see cref="ExerciseCollection"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is ExerciseCollection))
            {
                throw new ArgumentException("Invalid assignment source", "ExerciseCollection");
            }

            _isFiltered     = (aSource as ExerciseCollection)._isFiltered;
            _exerciseFilter = (aSource as ExerciseCollection)._exerciseFilter;
            _exerciseList.Clear();
            foreach (Exercise vExerciseSource in (aSource as ExerciseCollection)._exerciseList)
            {
                Exercise vExerciseTarget = new Exercise();
                vExerciseTarget.AssignFromSource(vExerciseSource);
                _exerciseList.Add(vExerciseTarget);
            }
        }
コード例 #3
0
        /// <summary>
        ///    Assigns all <c>aSource</c> object's values to this instance of <see cref="ExerciseCollection"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is ExerciseCollection))
            {
                throw new ArgumentException("Invalid assignment source", "ExerciseCollection");
            }

            _isFiltered = (aSource as ExerciseCollection)._isFiltered;
            _exerciseFilter = (aSource as ExerciseCollection)._exerciseFilter;
            _exerciseList.Clear();
            foreach (Exercise vExerciseSource in (aSource as ExerciseCollection)._exerciseList)
            {
                Exercise vExerciseTarget = new Exercise();
                vExerciseTarget.AssignFromSource(vExerciseSource);
                _exerciseList.Add(vExerciseTarget);
            }
        }