Show / Hide Table of Contents

Class AbpEnumerableExtensions

Extension methods for .

Inheritance
System.Object
AbpEnumerableExtensions
Namespace: System.Collections.Generic
Assembly: Volo.Abp.Core.dll
Syntax
public static class AbpEnumerableExtensions : object

Methods

JoinAsString(IEnumerable<String>, String)

Concatenates the members of a constructed collection of type System.String, using the specified separator between each member. This is a shortcut for string.Join(...)

Declaration
public static string JoinAsString(this IEnumerable<string> source, string separator)
Parameters
Type Name Description
IEnumerable<System.String> source

A collection that contains the strings to concatenate.

System.String separator

The string to use as a separator. separator is included in the returned string only if values has more than one element.

Returns
Type Description
System.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(...)

Declaration
public static string JoinAsString<T>(this IEnumerable<T> source, string separator)
Parameters
Type Name Description
IEnumerable<T> source

A collection that contains the objects to concatenate.

System.String separator

The string to use as a separator. separator is included in the returned string only if values has more than one element.

Returns
Type Description
System.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
Name Description
T

The type of the members of values.

WhereIf<T>(IEnumerable<T>, Boolean, Func<T, Boolean>)

Filters a by given predicate if given condition is true.

Declaration
public static IEnumerable<T> WhereIf<T>(this IEnumerable<T> source, bool condition, Func<T, bool> predicate)
Parameters
Type Name Description
IEnumerable<T> source

Enumerable to apply filtering

System.Boolean condition

A boolean value

Func<T, System.Boolean> predicate

Predicate to filter the enumerable

Returns
Type Description
IEnumerable<T>

Filtered or not filtered enumerable based on condition

Type Parameters
Name Description
T

WhereIf<T>(IEnumerable<T>, Boolean, Func<T, Int32, Boolean>)

Filters a by given predicate if given condition is true.

Declaration
public static IEnumerable<T> WhereIf<T>(this IEnumerable<T> source, bool condition, Func<T, int, bool> predicate)
Parameters
Type Name Description
IEnumerable<T> source

Enumerable to apply filtering

System.Boolean condition

A boolean value

Func<T, System.Int32, System.Boolean> predicate

Predicate to filter the enumerable

Returns
Type Description
IEnumerable<T>

Filtered or not filtered enumerable based on condition

Type Parameters
Name Description
T
Back to top Powered by Volosoft