Exemple #1
0
                    public IEnumerable <IAwaitable> Execute(IServices services)
                    {
                        while (CanExecute(_seg.Jpf, services))
                        {
                            IEnumerable <IJsmInstruction> executable = _seg.GetBodyInstructions();
                            IScriptExecuter executer = ExecutableSegment.GetExecuter(executable);
                            foreach (IAwaitable result in executer.Execute(services))
                            {
                                yield return(result);
                            }

                            // Skip one iteration to give control to other operations.
                            yield return(SpinAwaitable.Instance);
                        }
                    }
Exemple #2
0
                    public IEnumerable <IAwaitable> Execute(IServices services)
                    {
                        IEnumerable <IJsmInstruction> executable = GetExecutableInstructions(services);

                        if (executable == null)
                        {
                            yield break;
                        }

                        IScriptExecuter executer = ExecutableSegment.GetExecuter(executable);

                        foreach (IAwaitable result in executer.Execute(services))
                        {
                            yield return(result);
                        }
                    }