コード例 #1
0
        /// <summary>
        /// Retourne l'action correspondant à cette instruction.
        /// </summary>
        public override Action <Context> GetAction()
        {
            Action <Context> action = delegate(Context context)
            {
                var updateAction = Update.GetAction();
                for (Initialisation.GetAction()(context); (bool)Condition.GetValue(context); updateAction(context))
                {
                    object val = Block.Execute(context);
                    // Si le block a effectué return :
                    if (Block.HasReturned)
                    {
                        HasReturned = true;
                        ReturnValue = val;
                    }
                }
            };

            return(action);
        }