public void Run(SpokeConstruct so) { var fm = Methods[so.MethodIndex]; SpokeObject dm = new SpokeObject() { Type = ObjectType.Object }; dm.Variables = new SpokeObject[so.NumOfVars]; for (int index = 0; index < so.NumOfVars; index++) { dm.SetVariable(index, new SpokeObject()); } #if stacktrace try { #endif evaluateMethod(fm, new SpokeObject[1] { dm }); #if stacktrace } catch (Exception er) { dfss.AppendLine(er.ToString()); File.WriteAllText("C:\\ded.txt", dfss.ToString()); throw er; } #endif // evaluate(fm, dm, new List<SpokeObject>() { dm }); }
public void Run(SpokeConstruct so) { var fm = Methods[so.MethodIndex]; // var fm = _cla.First(a => a.Name == so.ClassName).Methods.First(a => a.MethodName == ".ctor"); SpokeObject dm = new SpokeObject(ObjectType.Object) ; dm.Variables = new SpokeObject[so.NumOfVars]; for (int index = 0; index < so.NumOfVars; index++){ dm.SetVariable(index, new SpokeObject(ObjectType.Null)); } evaluate(fm, dm, new SpokeObject[1] { dm }); // evaluate(fm, dm, new List<SpokeObject>() { dm }); }
public Tuple<SpokeQuestion, string, GameBoard> Run(SpokeConstruct so) { var fm = Methods[so.MethodIndex]; SpokeObject dm = new SpokeObject(new SpokeObject[so.NumOfVars], "Main"); for (int index = 0; index < so.NumOfVars; index++) { dm.SetVariable(index, new SpokeObject()); } try { evaluateMethod(fm, new SpokeObject[1] { dm }); } catch (AskQuestionException aq) { return new Tuple<SpokeQuestion, string, GameBoard>(aq.Question, serialize(), aq.GameBoard); } #if stacktrace catch (Exception er) { dfss.AppendLine(er.ToString()); File.WriteAllText("C:\\ded.txt", dfss.ToString()); throw er; } #endif return null; // evaluate(fm, dm, new List<SpokeObject>() { dm }); }