Class AbpListExtensions
Inheritance
System.Object
AbpListExtensions
Assembly: Volo.Abp.Core.dll
Syntax
public static class AbpListExtensions : object
Methods
AddFirst<T>(IList<T>, T)
Declaration
public static void AddFirst<T>(this IList<T> source, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| T |
item |
|
Type Parameters
AddLast<T>(IList<T>, T)
Declaration
public static void AddLast<T>(this IList<T> source, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| T |
item |
|
Type Parameters
FindIndex<T>(IList<T>, Predicate<T>)
Declaration
public static int FindIndex<T>(this IList<T> source, Predicate<T> selector)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
Returns
| Type |
Description |
| System.Int32 |
|
Type Parameters
GetOrAdd<T>(IList<T>, Func<T, Boolean>, Func<T>)
Declaration
public static T GetOrAdd<T>(this IList<T> source, Func<T, bool> selector, Func<T> factory)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Func<T, System.Boolean> |
selector |
|
| Func<T> |
factory |
|
Returns
Type Parameters
InsertAfter<T>(IList<T>, T, T)
Declaration
public static void InsertAfter<T>(this IList<T> source, T existingItem, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| T |
existingItem |
|
| T |
item |
|
Type Parameters
InsertAfter<T>(IList<T>, Predicate<T>, T)
Declaration
public static void InsertAfter<T>(this IList<T> source, Predicate<T> selector, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| T |
item |
|
Type Parameters
InsertBefore<T>(IList<T>, T, T)
Declaration
public static void InsertBefore<T>(this IList<T> source, T existingItem, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| T |
existingItem |
|
| T |
item |
|
Type Parameters
InsertBefore<T>(IList<T>, Predicate<T>, T)
Declaration
public static void InsertBefore<T>(this IList<T> source, Predicate<T> selector, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| T |
item |
|
Type Parameters
MoveItem<T>(List<T>, Predicate<T>, Int32)
Declaration
public static void MoveItem<T>(this List<T> source, Predicate<T> selector, int targetIndex)
Parameters
| Type |
Name |
Description |
| List<T> |
source |
|
| Predicate<T> |
selector |
|
| System.Int32 |
targetIndex |
|
Type Parameters
ReplaceOne<T>(IList<T>, T, T)
Declaration
public static void ReplaceOne<T>(this IList<T> source, T item, T replaceWith)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| T |
item |
|
| T |
replaceWith |
|
Type Parameters
ReplaceOne<T>(IList<T>, Predicate<T>, T)
Declaration
public static void ReplaceOne<T>(this IList<T> source, Predicate<T> selector, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| T |
item |
|
Type Parameters
ReplaceOne<T>(IList<T>, Predicate<T>, Func<T, T>)
Declaration
public static void ReplaceOne<T>(this IList<T> source, Predicate<T> selector, Func<T, T> itemFactory)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| Func<T, T> |
itemFactory |
|
Type Parameters
ReplaceWhile<T>(IList<T>, Predicate<T>, T)
Declaration
public static void ReplaceWhile<T>(this IList<T> source, Predicate<T> selector, T item)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| T |
item |
|
Type Parameters
ReplaceWhile<T>(IList<T>, Predicate<T>, Func<T, T>)
Declaration
public static void ReplaceWhile<T>(this IList<T> source, Predicate<T> selector, Func<T, T> itemFactory)
Parameters
| Type |
Name |
Description |
| IList<T> |
source |
|
| Predicate<T> |
selector |
|
| Func<T, T> |
itemFactory |
|
Type Parameters
SortByDependencies<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
Sort a list by a topological sorting, which consider their dependencies.
Declaration
public static List<T> SortByDependencies<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> getDependencies)
Parameters
| Type |
Name |
Description |
| IEnumerable<T> |
source |
A list of objects to sort
|
| Func<T, IEnumerable<T>> |
getDependencies |
Function to resolve the dependencies
|
Returns
| Type |
Description |
| List<T> |
Returns a new list ordered by dependencies.
If A depends on B, then B will come before than A in the resulting list.
|
Type Parameters
| Name |
Description |
| T |
The type of the members of values.
|