Exemplo n.º 1
0
 public void Restore(StoredCode storedCode)
 {
     _stack.Deserialize(storedCode.Stack);
     _dataStack.Deserialize(storedCode.DataStack);
     _pc   = storedCode.PC;
     _flag = storedCode.Flag;
     _script.AddVariable("Arg", storedCode.Arg);
     _script.AddVariable("Result", storedCode.Result);
 }
Exemplo n.º 2
0
        public StoredCode Store()
        {
            var sc = new StoredCode();

            sc.Stack     = _stack.Serialize();
            sc.DataStack = _dataStack.Serialize();
            sc.PC        = _pc;
            sc.Flag      = _flag;

            sc.Arg    = _script.GetVariable("Arg");
            sc.Result = _script.GetVariable("Result");

            return(sc);
        }