Class AbpEnumerableExtensions
- Namespace
- System.Collections.Generic
- Assembly
- Volo.Abp.Core.dll
Extension methods for IEnumerable<T>.
public static class AbpEnumerableExtensions
- Inheritance
-
AbpEnumerableExtensions
- Inherited Members
Methods
JoinAsString(IEnumerable<string>, string)
Concatenates the members of a constructed IEnumerable<T> collection of type System.String, using the specified separator between each member. This is a shortcut for string.Join(...)
public static string JoinAsString(this IEnumerable<string> source, string separator)
Parameters
source
IEnumerable<string>A collection that contains the strings to concatenate.
separator
stringThe string to use as a separator. separator is included in the returned string only if values has more than one element.
Returns
- string
A string that consists of the members of values delimited by the separator string. If values has no members, the method returns System.String.Empty.
JoinAsString<T>(IEnumerable<T>, string)
Concatenates the members of a collection, using the specified separator between each member. This is a shortcut for string.Join(...)
public static string JoinAsString<T>(this IEnumerable<T> source, string separator)
Parameters
source
IEnumerable<T>A collection that contains the objects to concatenate.
separator
stringThe string to use as a separator. separator is included in the returned string only if values has more than one element.
Returns
- string
A string that consists of the members of values delimited by the separator string. If values has no members, the method returns System.String.Empty.
Type Parameters
T
The type of the members of values.
WhereIf<T>(IEnumerable<T>, bool, Func<T, bool>)
Filters a IEnumerable<T> by given predicate if given condition is true.
public static IEnumerable<T> WhereIf<T>(this IEnumerable<T> source, bool condition, Func<T, bool> predicate)
Parameters
source
IEnumerable<T>Enumerable to apply filtering
condition
boolA boolean value
predicate
Func<T, bool>Predicate to filter the enumerable
Returns
- IEnumerable<T>
Filtered or not filtered enumerable based on
condition
Type Parameters
T
WhereIf<T>(IEnumerable<T>, bool, Func<T, int, bool>)
Filters a IEnumerable<T> by given predicate if given condition is true.
public static IEnumerable<T> WhereIf<T>(this IEnumerable<T> source, bool condition, Func<T, int, bool> predicate)
Parameters
source
IEnumerable<T>Enumerable to apply filtering
condition
boolA boolean value
predicate
Func<T, int, bool>Predicate to filter the enumerable
Returns
- IEnumerable<T>
Filtered or not filtered enumerable based on
condition
Type Parameters
T