Esempio n. 1
0
        public void ExecInstructions()
        {
            int num = 0;

            try
            {
                while (State.ExecutionInterruption == ExecutionInterruption.None && State.FlowInterruption == FlowInterruption.Next)
                {
                    ILInstruction inst;
                    if (!TryMoveToNextInstruction(out inst))
                    {
                        State.ExecutionInterruption = ExecutionInterruption.Finished;
                        break;
                    }

                    IILOperationEngine insEn = _operationSet.GetEngine(inst.ILOperation);
                    insEn.Execute(Context, State, inst.Operand);

                    inst.ExecuteCallback();

                    if (State.FlowInterruption != FlowInterruption.Next)
                    {
                        ResolveFlowInterruption();
                    }
                    num++;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Operation execution terminated due to an error. See inner exception", ex);
            }
        }