Skip to main content

EnumerableUtils

Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class EnumerableUtils

Methods

FirstOrDefault(IEnumerable)

View Source
Declaration
public static object FirstOrDefault(IEnumerable items)
Returns

System.Object

Parameters
TypeName
System.Collections.IEnumerableitems

ElementAt(IEnumerable, Int32)

View Source
Declaration
public static object ElementAt(IEnumerable items, int index)
Returns

System.Object

Parameters
TypeName
System.Collections.IEnumerableitems
System.Int32index

Skip(IEnumerable, Int32)

View Source
Declaration
public static List<object> Skip(IEnumerable items, int count)
Returns

System.Collections.Generic.List<System.Object>

Parameters
TypeName
System.Collections.IEnumerableitems
System.Int32count

SplitOnFirst(IEnumerable, out Object)

View Source
Declaration
public static List<object> SplitOnFirst(IEnumerable items, out object first)
Returns

System.Collections.Generic.List<System.Object>

Parameters
TypeName
System.Collections.IEnumerableitems
System.Objectfirst

Take(IEnumerable, Int32)

View Source
Declaration
public static List<object> Take(IEnumerable items, int count)
Returns

System.Collections.Generic.List<System.Object>

Parameters
TypeName
System.Collections.IEnumerableitems
System.Int32count

Count(IEnumerable)

View Source
Declaration
public static int Count(IEnumerable items)
Returns

System.Int32

Parameters
TypeName
System.Collections.IEnumerableitems

ToList(IEnumerable)

View Source
Declaration
public static List<object> ToList(IEnumerable items)
Returns

System.Collections.Generic.List<System.Object>

Parameters
TypeName
System.Collections.IEnumerableitems

NullIfEmpty(IEnumerable)

View Source
Declaration
public static IEnumerable NullIfEmpty(IEnumerable items)
Returns

System.Collections.IEnumerable

Parameters
TypeName
System.Collections.IEnumerableitems

IsEmpty(IEnumerable)

View Source
Declaration
public static bool IsEmpty(IEnumerable items)
Returns

System.Boolean

Parameters
TypeName
System.Collections.IEnumerableitems