コード例 #1
0
        public static bool TryForeachCILNoDebug(CommandQueue queue, int entry_ind, DynamicTag listItem)
        {
            ForeachCommandData dat = queue.CurrentRunnable.EntryData[entry_ind] as ForeachCommandData;

            if (++dat.Index < dat.List.Count)
            {
                listItem.Internal = dat.List[dat.Index];
                return(true);
            }
            return(false);
        }
コード例 #2
0
        /// <summary>Executes the callback part of the foreach command.</summary>
        /// <param name="queue">The command queue involved.</param>
        /// <param name="entry">Entry to be executed.</param>
        /// <param name="listItem">Dynamic tag to hold the item in the list.</param>
        public static bool TryForeachCIL(CommandQueue queue, CommandEntry entry, DynamicTag listItem)
        {
            ForeachCommandData dat = queue.CurrentRunnable.EntryData[entry.BlockStart - 1] as ForeachCommandData;

            if (++dat.Index < dat.List.Count)
            {
                listItem.Internal = dat.List[dat.Index];
                if (entry.ShouldShowGood(queue))
                {
                    entry.GoodOutput(queue, "Looping...: " + TextStyle.Separate + dat.Index + TextStyle.Base + "/" + TextStyle.Separate + dat.List.Count);
                }
                return(true);
            }
            if (entry.ShouldShowGood(queue))
            {
                entry.GoodOutput(queue, "Foreach stopping.");
            }
            return(false);
        }