Beispiel #1
0
        public override PNode evaluate(PNode evaluateMe, PatternMatcher successfulMatch)
        {
            PatternMatcher match = successfulMatch;

            //	Extract the "arguments" from the PatternMatcher.
            List <PNode>     M        = match.Matching;                 //	The pattern -> prose index from the match
            AssemblyNameWord asmbly   = ((AssemblyNameWord)M[1].value);
            string           typeName = ((StringLiteralObject)M[4].value).literal;

            RawWord[] newTypeWord;
            if (M[6].value is RawWordObject)
            {
                newTypeWord = ((RawWordObject)M[6].value).RawWords;
            }
            else
            {
                newTypeWord = ((Word)M[6].value).RawWords;
            }
            BindTypeAction action = new BindTypeAction(asmbly, typeName, newTypeWord);

            value    = new ProseObject[3];
            value[0] = M[0].value;
            value[1] = action;
            value[2] = M[7].value;

            PNode ret = replaceWithValueAt(evaluateMe, successfulMatch);

            value = null;
            return(ret);
        }
Beispiel #2
0
 public void performAction(ProseRuntime runtime)
 {
     //	Load the dll
     Assembly assembly = Assembly.LoadFrom(dllName);
     //	Build an assembly word from it
     AssemblyNameWord asmName = new AssemblyNameWord(rawWords, runtime, assembly);
     runtime.addWord(asmName);
 }
Beispiel #3
0
        public void performAction(ProseRuntime runtime)
        {
            //	Load the dll
            Assembly assembly = Assembly.LoadFrom(dllName);
            //	Build an assembly word from it
            AssemblyNameWord asmName = new AssemblyNameWord(rawWords, runtime, assembly);

            runtime.addWord(asmName);
        }
Beispiel #4
0
 public BindTypeAction(AssemblyNameWord assemblyWord, string typeName, RawWord[] rawWords)
 {
     this.assemblyWord = assemblyWord;
     this.typeName     = typeName;
     this.rawWords     = rawWords;
 }
Beispiel #5
0
 public BindTypeAction(AssemblyNameWord assemblyWord, string typeName, RawWord[] rawWords)
 {
     this.assemblyWord = assemblyWord;
     this.typeName = typeName;
     this.rawWords = rawWords;
 }