Пример #1
0
        public static PropertyDescriptor Create(global::Jint.Engine engine,
                                                DomConverter converter,
                                                string propertyName,
                                                MethodInfo[] methods,
                                                JsValue owner)
        {
            var func = new ClrMethodInfoFunc(converter, engine, methods, owner);

            //todo: check if this necessary
            func.FastAddProperty("toString",
                                 new JsValue(new ClrFunctionInstance(engine,
                                                                     (value, values) => new JsValue("function " + propertyName + "() { [native code] }"))),
                                 false, false, false);

            return(new PropertyDescriptor(func, false, true, false));
        }