示例#1
0
文件: Method.cs 项目: juhan/NModel
        public Method(MethodInfo methodInfo)
        {
            //this.instanceType = null;
            this.parameterTypes = null;
            this.methodInfo = methodInfo;
            //this.isStatic = methodInfo.IsStatic;
            this.parameterInfos = methodInfo.GetParameters();
            //this.returnType = methodInfo.ReturnType.Equals(typeof(void)) ? null : methodInfo.ReturnType;

            this.thisParameterGenerator = Method.GetThisParameterGenerator(methodInfo);
            this.inputParameterGenerators = Method.GetInputParameterGenerators(methodInfo); ;

            Type[] inputParameterTypes = ReflectionHelper.GetInputParameterTypes(methodInfo);
            this.parameterlessEnablingCondition = new EnablingCondition(true, inputParameterTypes, methodInfo);
            this.enablingCondition = new EnablingCondition(false, inputParameterTypes, methodInfo);
        }
示例#2
0
        public Method(MethodInfo methodInfo)
        {
            //this.instanceType = null;
            this.parameterTypes = null;
            this.methodInfo     = methodInfo;
            //this.isStatic = methodInfo.IsStatic;
            this.parameterInfos = methodInfo.GetParameters();
            //this.returnType = methodInfo.ReturnType.Equals(typeof(void)) ? null : methodInfo.ReturnType;

            this.thisParameterGenerator   = Method.GetThisParameterGenerator(methodInfo);
            this.inputParameterGenerators = Method.GetInputParameterGenerators(methodInfo);;

            Type[] inputParameterTypes = ReflectionHelper.GetInputParameterTypes(methodInfo);
            this.parameterlessEnablingCondition = new EnablingCondition(true, inputParameterTypes, methodInfo);
            this.enablingCondition = new EnablingCondition(false, inputParameterTypes, methodInfo);
        }