|
| static T | Shift< T > (this IList< T > list) |
| | Removes the first item from the list and returns it.
|
| static T | Pop< T > (this IList< T > list) |
| | Removes the last item from the list and returns it.
|
| static bool | TryPop< T > (this IList< T > list, out T result) |
| | Attempt to pop the last element off of a list.
|
| static bool | TryShift< T > (this IList< T > list, out T result) |
| | Attempt to shift the first element off of a list.
|
| static void | Unshift< T > (this IList< T > list, T value) |
| | Inserts an item at the beginning of the list.
|
| static void | Push< T > (this IList< T > list, T value) |
| | Alias for .Add: appends an item to the list.
|
| static IList< T > | AddIf< T > (this IList< T > list, bool shouldAdd, T value) |
| | Adds the value to the list if the flag was set to true shortcut for: if (flag) { list.Add(value); }.
|
| static IList< T > | AddAll< T > (this IList< T > list, params T[] items) |
| | Adds all the provided items and returns the list.
|
| static bool | TryEjectFirst< T > (this IList< T > list, Func< T, bool > matcher, out T result) |
| | Attempts to eject the first matching.
|
| static T | EjectFirst< T > (this IList< T > list, Func< T, bool > matcher) |
| | Ejects the first matched item from the collection or throws if it cannot:
|
| static bool | TryEjectLast< T > (this IList< T > list, Func< T, bool > matcher, out T result) |
| | Tries to eject the first matched item from the collection.
|
| static T | EjectLast< T > (this IList< T > list, Func< T, bool > matcher) |
| | Ejects the first matched item from the collection or throws if it cannot:
|
| static IList< T > | Reversed< T > (this IList< T > list) |
| | Returns a NEW list: a copy of the provided on but with the order reversed.
|
| static List< T > | ReversedInPlace< T > (this List< T > list) |
| | Reverses the list IN-PLACE (modifies the original list) and returns it for fluent syntax.
|
| static T[] | ReversedInPlace< T > (this T[] array) |
| | Reverses the array IN-PLACE (modifies the original list) and returns it for fluent syntax.
|
Provides methods on lists as one might expect from JavaScript.