Esempio n. 1
0
        public void performAction(ProseRuntime runtime)
        {
            //	Look up the type.

            MethodInfo methodInfo = typeWord.TypeObject.GetMethod(methodName, BindingFlags.Public | BindingFlags.Static);

            ProseLanguage.ActionDelegate delegateMethod = (ProseLanguage.ActionDelegate)Delegate.CreateDelegate(typeof(ProseLanguage.ActionDelegate), methodInfo);
            MethodNameWord methodNameWord = new MethodNameWord(rawWords, runtime, delegateMethod);

            runtime.addWord(methodNameWord);
        }
Esempio n. 2
0
 public MethodDelegateAction(MethodNameWord methodName, List <ProseObject> args)
 {
     this.methodName = methodName;
     this.args       = args;
     this.method     = methodName.DelegateMethod;
 }
Esempio n. 3
0
 public MethodNameWord(RawWord[] words, ProseRuntime runtime, ProseLanguage.ActionDelegate delegateMethod )
     : base(words)
 {
     this.delegateMethod = delegateMethod;
     isa = new Word[] { runtime.word("@method") };
 }
Esempio n. 4
0
 public MethodDelegateAction(MethodNameWord methodName, List<ProseObject> args)
 {
     this.methodName = methodName;
     this.args = args;
     this.method = methodName.DelegateMethod;
 }
Esempio n. 5
0
 public MethodNameWord(RawWord[] words, ProseRuntime runtime, ProseLanguage.ActionDelegate delegateMethod)
     : base(words)
 {
     this.delegateMethod = delegateMethod;
     isa = new Word[] { runtime.word("@method") };
 }