C# Class ServiceStack.Common.Extensions.EnumerableExtensions

These extensions have a potential to conflict with the LINQ extensions methods so leaving the implmentation in the 'Extensions' sub-namespace to force explicit opt-in
显示文件 Open project: xamarin/ServiceStack Class Usage Examples

Public Methods

Method Description
ConvertAll ( IEnumerable items, Func converter ) : List
ConvertAll ( IEnumerable items, Func converter ) : List
EquivalentTo ( IEnumerable thisList, IEnumerable otherList ) : bool
First ( IEnumerable items ) : object
FirstNonDefault ( IEnumerable values ) : T
FirstNonDefaultOrEmpty ( IEnumerable values ) : string
ForEach ( IEnumerable values, Action action ) : void
SafeConvertAll ( IEnumerable items, Func converter ) : List
ToHashSet ( IEnumerable items ) : HashSet
ToList ( IEnumerable items ) : List
ToObjects ( IEnumerable items ) : List

Method Details

ConvertAll() public static method

public static ConvertAll ( IEnumerable items, Func converter ) : List
items IEnumerable
converter Func
return List

ConvertAll() public static method

public static ConvertAll ( IEnumerable items, Func converter ) : List
items IEnumerable
converter Func
return List

EquivalentTo() public static method

public static EquivalentTo ( IEnumerable thisList, IEnumerable otherList ) : bool
thisList IEnumerable
otherList IEnumerable
return bool

First() public static method

public static First ( IEnumerable items ) : object
items IEnumerable
return object

FirstNonDefault() public static method

public static FirstNonDefault ( IEnumerable values ) : T
values IEnumerable
return T

FirstNonDefaultOrEmpty() public static method

public static FirstNonDefaultOrEmpty ( IEnumerable values ) : string
values IEnumerable
return string

ForEach() public static method

public static ForEach ( IEnumerable values, Action action ) : void
values IEnumerable
action Action
return void

SafeConvertAll() public static method

public static SafeConvertAll ( IEnumerable items, Func converter ) : List
items IEnumerable
converter Func
return List

ToHashSet() public static method

public static ToHashSet ( IEnumerable items ) : HashSet
items IEnumerable
return HashSet

ToList() public static method

public static ToList ( IEnumerable items ) : List
items IEnumerable
return List

ToObjects() public static method

public static ToObjects ( IEnumerable items ) : List
items IEnumerable
return List