コード例 #1
0
        /// <summary>
        /// Copies the parameters from one method to another.
        /// </summary>
        /// <param name="method">The method.</param>
        /// <param name="other">The other method.</param>
        public static void CopyParameters(this Method method, Method other)
        {
            if (method == null)
            {
                throw new ArgumentNullException("method", "method is null.");
            }

            if (other == null)
            {
                throw new ArgumentNullException("other", "other is null.");
            }

            Contract.EndContractBlock();
            if (other.ParameterCount > 0)
            {
                method.AddParameters(other.Parameters);
            }
        }