コード例 #1
0
ファイル: GlobalObject.cs プロジェクト: ForNeVeR/pnet
        // Add a builtin function to the global object.
        private void AddBuiltin(EngineInstance inst, string name)
        {
            MethodInfo method = typeof(GlobalObject).GetMethod(name);

            globalObject.Put(name, new BuiltinFunction
                                 (inst.GetFunctionPrototype(), name, method),
                             PropertyAttributes.None);
        }
コード例 #2
0
ファイル: JSObject.cs プロジェクト: ForNeVeR/pnet
        // Add a builtin method to a prototype.
        internal void AddBuiltin(EngineInstance inst, String name)
        {
            MethodInfo method = GetType().GetMethod(name);

            Put(name, new BuiltinFunction
                    (inst.GetFunctionPrototype(), name, method),
                PropertyAttributes.None);
        }
コード例 #3
0
	// Add a builtin method to a prototype.
	internal void AddBuiltin(EngineInstance inst, String name)
			{
				MethodInfo method = GetType().GetMethod(name);
				Put(name, new BuiltinFunction
					(inst.GetFunctionPrototype(), name, method),
					PropertyAttributes.None);
			}
コード例 #4
0
	// Add a builtin function to the global object.
	private void AddBuiltin(EngineInstance inst, string name)
			{
				MethodInfo method = typeof(GlobalObject).GetMethod(name);
				globalObject.Put(name, new BuiltinFunction
					(inst.GetFunctionPrototype(), name, method),
					PropertyAttributes.None);
			}