Exemplo n.º 1
0
        private int Start(Flow flow, out int currentIndex, out int lastIndex, out bool ascending)
        {
            var firstIndex = flow.GetValue <int>(this.firstIndex);

            lastIndex    = flow.GetValue <int>(this.lastIndex);
            ascending    = firstIndex <= lastIndex;
            currentIndex = firstIndex;
            flow.SetValue(this.currentIndex, currentIndex);

            return(flow.EnterLoop());
        }
Exemplo n.º 2
0
        private int Start(Flow flow, out IEnumerator enumerator, out IDictionaryEnumerator dictionaryEnumerator, out int currentIndex)
        {
            if (dictionary)
            {
                dictionaryEnumerator = flow.GetValue <IDictionary>(collection).GetEnumerator();
                enumerator           = dictionaryEnumerator;
            }
            else
            {
                enumerator           = flow.GetValue <IEnumerable>(collection).GetEnumerator();
                dictionaryEnumerator = null;
            }

            currentIndex = -1;

            return(flow.EnterLoop());
        }
Exemplo n.º 3
0
 private int Start(Flow flow)
 {
     return(flow.EnterLoop());
 }