예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MethodRunner"/> class.
        /// </summary>
        /// <param name="typeRunner">The assembly runner.</param>
        /// <param name="method">The method.</param>
        /// <param name="target">The target.</param>
        /// <param name="methodSignature">The method signature.</param>
        public MethodRunner(TypeRunner typeRunner, MethodInfo method, object target, MethodSignature methodSignature)
        {
            // Check for null arguments.
            if (typeRunner == null)
            {
                throw new ArgumentNullException("typeRunner");
            }

            if (method == null)
            {
                throw new ArgumentNullException("method");
            }

            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            // Save the parameters into fields.
            this.typeRunner = typeRunner;
            this.method = method;
            this.target = target;
            this.methodSignature = methodSignature;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MethodRunner"/> class.
        /// </summary>
        /// <param name="typeRunner">The assembly runner.</param>
        /// <param name="method">The method.</param>
        /// <param name="target">The target.</param>
        /// <param name="methodSignature">The method signature.</param>
        public MethodRunner(TypeRunner typeRunner, MethodInfo method, object target, MethodSignature methodSignature)
        {
            // Check for null arguments.
            if (typeRunner == null)
            {
                throw new ArgumentNullException("typeRunner");
            }

            if (method == null)
            {
                throw new ArgumentNullException("method");
            }

            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            // Save the parameters into fields.
            this.typeRunner      = typeRunner;
            this.method          = method;
            this.target          = target;
            this.methodSignature = methodSignature;
        }