示例#1
0
        public static StaticMethodGeometryFunction CreateFunction(MethodInfo method)
        {
            var pi = method.GetParameters();
            Debug.Assert(typeof(Geometry).IsAssignableFrom(pi[0].GetType()));

            Type clz = method.DeclaringType;

            String category = ExtractCategory(ClassUtility.GetClassname(clz));
            String funcName = method.Name;
            String[] paramNames = ExtractParamNames(method);
            Type[] paramTypes = ExtractParamTypes(method);
            Type returnType = method.ReturnType;
            return new StaticMethodGeometryFunction(category, funcName, paramNames, paramTypes,
                                                    returnType, method);
        }