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()); }
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()); }
private int Start(Flow flow) { return(flow.EnterLoop()); }