예제 #1
0
        protected void BuildMethod(ClassType classType, System.Reflection.MethodInfo methodInfo)
        {
            var retType = storage.GetType(ConvertMSILNames(methodInfo.ReturnType));


            var args =
                methodInfo.GetParameters()
                .ToList()
                .Select(x => new { Type = storage.GetType(ConvertMSILNames(x.ParameterType)), Name = x.Name });

            if (!args.Any(x => x.Type == null))
            {
                var method = new plsql_msil.Types.MethodInfo(methodInfo.Name, retType, methodInfo.IsStatic, classType);

                foreach (var item in args)
                {
                    method.AddArg(item.Name, item.Type);
                }

                classType.AddMethod(method);
            }
        }