Class ListExtensions
Summary description for ListExtensions.
Inheritance
System.Object
ListExtensions
Assembly: ImageVault.Common.dll
Syntax
public static class ListExtensions : Object
Methods
Batch<T>(IEnumerable<T>, Int32)
Batches the supplied list in different slices
Declaration
public static IEnumerable<IList<T>> Batch<T>(this IEnumerable<T> list, int size)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
list |
|
System.Int32 |
size |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.Collections.Generic.IList<T>> |
|
Type Parameters
Csv(IEnumerable<String>)
Converts the list of strings to a comma separated string
Declaration
public static string Csv(this IEnumerable<string> e)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.String> |
e |
|
Returns
Type |
Description |
System.String |
|
FindCategory(IList<Category>, Int32)
Finds a category in the list/tree
Declaration
public static Category FindCategory(this IList<Category> categories, int id)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<Category> |
categories |
|
System.Int32 |
id |
|
Returns
Join(IEnumerable<String>, String)
Joins the list of strings
Declaration
public static string Join(this IEnumerable<string> e, string separator = ",")
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.String> |
e |
|
System.String |
separator |
|
Returns
Type |
Description |
System.String |
|