/// <summary> /// Returns a Slinq that enumerates over the values of the specified linked list in ascending order. /// Slinqs created by this method will chain removal operations to the underlying list. /// </summary> public static Slinq <T, LinkedListContext <T> > Slinq <T>(this LinkedList <T> list) { return(LinkedListContext <T> .Slinq(list.First, 1)); }
/// <summary> /// Returns a Slinq that enumerates over the values of the specified linked list in decending order. /// Slinqs created by this method will chain removal operations to the underlying list. /// </summary> public static Slinq <T, LinkedListContext <T> > SlinqDescending <T>(this LinkedList <T> list) { return(LinkedListContext <T> .Slinq(list.Last, -1)); }
/// <summary> /// Returns a Slinq that starts with the value of the specified node and proceeds along node links. /// If step is positive, the Slinq will move along Next links, if step is negative the Slinq will move along Previous links. If step is /// zero the Slinq will stay in place. /// If the specified node is null, the resulting Slinq will be empty. /// Slinqs created by this method will chain removal operations to the underlying list. /// </summary> public static Slinq <T, LinkedListContext <T> > Slinq <T>(this LinkedListNode <T> node, int step) { return(LinkedListContext <T> .Slinq(node, step)); }