EnumerableUtils
Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public static class EnumerableUtils
Methods
IsEmpty(ICollection)
View Source
Declaration
public static bool IsEmpty(this ICollection collection)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Collections.ICollection | collection |
IsEmpty<T>(T[])
View Source
Declaration
public static bool IsEmpty<T>(this T[] collection)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
<T>[] | collection |
Type Parameters
T
IsEmpty<T>(Nullable<List<T>>)
View Source
Declaration
public static bool IsEmpty<T>(this List<T>? collection)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Nullable<List<<T>>> | collection |
Type Parameters
T
EmptyIfNull<T>(T[])
View Source
Declaration
public static T[] EmptyIfNull<T>(this T[] collection)
Returns
<T>[]
Parameters
Type | Name |
---|---|
<T>[] | collection |
Type Parameters
T
EmptyIfNull<T>(Nullable<List<T>>)
View Source
Declaration
public static List<T> EmptyIfNull<T>(this List<T>? collection)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
System.Nullable<List<<T>>> | collection |
Type Parameters
T
AsList(Object)
View Source
Declaration
public static List<object>? AsList(this object items)
Returns
System.Nullable<List<System.Object>>
Parameters
Type | Name |
---|---|
System.Object | items |
AsStringList(Object)
View Source
Declaration
public static List<string>? AsStringList(this object items)
Returns
System.Nullable<List<System.String>>
Parameters
Type | Name |
---|---|
System.Object | items |
AsList(IEnumerable)
View Source
Declaration
public static List<object>? AsList(this IEnumerable items)
Returns
System.Nullable<List<System.Object>>
Parameters
Type | Name |
---|---|
System.Collections.IEnumerable | items |
AsList<T>(Nullable<IEnumerable<T>>)
View Source
Declaration
public static List<T> AsList<T>(this IEnumerable<T>? items)
Returns
List<<T>>
Parameters
Type | Name |
---|---|
System.Nullable<System.Collections.IEnumerable<<T>>> | items |
Type Parameters
T
Map<To, From>(Nullable<IEnumerable<From>>, Func<From, To>)
View Source
Declaration
public static List<To> Map<To, From>(this IEnumerable<From>? items, Func<From, To> converter)
Returns
List<<To>>
Parameters
Type | Name |
---|---|
System.Nullable<System.Collections.IEnumerable<<From>>> | items |
Func<<From>,<To>> | converter |
Type Parameters
To
From
Map<To>(IEnumerable, Func<Object, To>)
View Source
Declaration
public static List<To> Map<To>(this IEnumerable items, Func<object, To> converter)
Returns
List<<To>>
Parameters
Type | Name |
---|---|
System.Collections.IEnumerable | items |
Func<System.Object,<To>> | converter |
Type Parameters
To
FirstElementType(IEnumerable, String)
View Source
Declaration
public static Type FirstElementType(this IEnumerable collection, string key)
Returns
Type
Parameters
Type | Name |
---|---|
System.Collections.IEnumerable | collection |
System.String | key |
GetIgnoreCase<T>(IDictionary<String, T>, String)
View Source
Declaration
public static T GetIgnoreCase<T>(this IDictionary<string, T> map, string name)
Returns
<T>
Parameters
Type | Name |
---|---|
System.Collections.IDictionary<System.String,<T>> | map |
System.String | name |
Type Parameters
T
FirstOrDefault(IEnumerable)
View Source
Declaration
public static object FirstOrDefault(IEnumerable e)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Collections.IEnumerable | e |
Count(IEnumerable)
View Source
Declaration
public static int Count(IEnumerable e)
Returns
System.Int32
Parameters
Type | Name |
---|---|
System.Collections.IEnumerable | e |