Пример #1
0
        /// <summary>
        /// Assigns all <c>aSource</c> FanFunctionAccess's properties to this instance of <see cref="FanFunctionAccess"/>.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is FanFunctionAccess))
            {
                throw new ArgumentException("Invalid Source Argument to FunctionAccess Assign");
            }

            base.AssignFromSource(aSource);
            _functionAccess.AssignFromSource((aSource as FanFunctionAccess)._functionAccess);
        }
Пример #2
0
        /// <summary>
        /// Assigns the properties of aSource to this instance.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is UserFunctionAccessCollection))
            {
                throw new ArgumentException("Invalid Source Argument to UserFunctionAccessCollection Assign");
            }

            base.AssignFromSource(aSource);
            _functionAccessList.Clear();
            (aSource as UserFunctionAccessCollection)._functionAccessList.ForEach(vFunctionAccessSource =>
            {
                var vFunctionAccessTarget = new FunctionAccess();
                vFunctionAccessTarget.AssignFromSource(vFunctionAccessSource);
                _functionAccessList.Add(vFunctionAccessTarget);
            });
        }
        /// <summary>
        /// Assigns the properties of aSource to this instance.
        /// </summary>
        /// <param name="aSource">A source object.</param>
        public override void AssignFromSource(object aSource)
        {
            if (!(aSource is FanFunctionAccessCollection))
            {
                throw new ArgumentException("Invalid Source Argument to FanFunctionAccessCollection Assign");
            }

            base.AssignFromSource(aSource);
            _functionAccessList.Clear();
            (aSource as FanFunctionAccessCollection)._functionAccessList.ForEach(vFunctionAccessSource =>
            {
                var vFunctionAccessTarget = new FunctionAccess();
                vFunctionAccessTarget.AssignFromSource(vFunctionAccessSource);
                _functionAccessList.Add(vFunctionAccessTarget);
            });
        }