Axiom.Runtime.Instructions.RetryMeElseInstruction.Process C# (CSharp) Метод

Process() публичный Метод

public Process ( object arguments ) : void
arguments object
Результат void
        public override void Process(object[] arguments)
        {
            _label = (string)arguments[0];
        }

Usage Example

        public void RetryMeElse()
        {
            AbstractMachineState state = SetupMachine();

            RetryMeElseInstruction i = new RetryMeElseInstruction();

            AMProgram program = (AMProgram)state.Program;
            AMTrail trail = (AMTrail)state.Trail;

            Choicepoint b = new Choicepoint();
            b.CE = new EnvironmentFrame();
            b.B = new Choicepoint();
            b.CP = new ProgramNode();
            b.TR = 1;
            b.NextClause = new ProgramClause();
            state.B = b;

            program.AddLabel("foobar/2", new ProgramClause());

            object[] args = { "foobar/2" };

            i.Process(args);

            i.Execute(state);

            Assert.AreEqual("retry_me_else", i.Name());
            Assert.AreEqual(1, i.NumberOfArguments());
            Assert.AreSame(state.E, b.CE);
            Assert.AreEqual(b.TR, trail.TR);
            Assert.AreEqual(state.B.NextClause, program["foobar/2"]);
        }