Пример #1
0
 /// <summary>
 /// Iterates over all elements in <paramref name="tsList"/> in the reverse order and calls
 /// <paramref name="handler"/>
 /// </summary>
 /// <typeparam name="T">Type to store in list</typeparam>
 /// <param name="tsList">A thread-safe list</param>
 /// <param name="handler">Called for each element</param>
 public static void IterateAllReverse <T>(this ThreadSafe.IList <T> tsList, IterateAllDelegate <T> handler)
 {
     tsList.Iterate(0, -1, true, (tsList2, index, value) => {
         handler(tsList2, index, value);
         return(true);
     });
 }
Пример #2
0
 /// <summary>
 /// Iterates over all elements in <paramref name="tsList"/> in the reverse order and calls
 /// <paramref name="handler"/>
 /// </summary>
 /// <typeparam name="T">Type to store in list</typeparam>
 /// <param name="tsList">A thread-safe list</param>
 /// <param name="handler">Called for each element</param>
 public static void IterateReverse <T>(this ThreadSafe.IList <T> tsList, IterateDelegate <T> handler)
 {
     tsList.Iterate(0, -1, true, handler);
 }