Class ListExtensions
Summary description for ListExtensions.
Inheritance
System.Object
ListExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Common.Data
Assembly: ImageVault.Common.dll
Syntax
public static class ListExtensions
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
Name | Description |
---|---|
T |
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
Type | Description |
---|---|
Category |
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 |