Table of Contents

Class CollectionExtensions

Namespace
Shift.Common
Assembly
Shift.Common.dll
public static class CollectionExtensions
Inheritance
CollectionExtensions
Inherited Members

Methods

EmptyIfNull(SearchResultList)

public static SearchResultList EmptyIfNull(this SearchResultList list)

Parameters

list SearchResultList

Returns

SearchResultList

EmptyIfNull(ICollection)

public static ICollection EmptyIfNull(this ICollection list)

Parameters

list ICollection

Returns

ICollection

EmptyIfNull(IList)

public static IList EmptyIfNull(this IList list)

Parameters

list IList

Returns

IList

EmptyIfNull(NameValueCollection)

public static NameValueCollection EmptyIfNull(this NameValueCollection collection)

Parameters

collection NameValueCollection

Returns

NameValueCollection

EmptyIfNull(PropertyDescriptorCollection)

public static PropertyDescriptorCollection EmptyIfNull(this PropertyDescriptorCollection collection)

Parameters

collection PropertyDescriptorCollection

Returns

PropertyDescriptorCollection

EmptyIfNull<T>(ICollection<T>)

public static ICollection<T> EmptyIfNull<T>(this ICollection<T> collection)

Parameters

collection ICollection<T>

Returns

ICollection<T>

Type Parameters

T

EmptyIfNull<T>(IEnumerable<T>)

public static IEnumerable<T> EmptyIfNull<T>(this IEnumerable<T> enumerable)

Parameters

enumerable IEnumerable<T>

Returns

IEnumerable<T>

Type Parameters

T

EmptyIfNull<T>(IList<T>)

public static IList<T> EmptyIfNull<T>(this IList<T> list)

Parameters

list IList<T>

Returns

IList<T>

Type Parameters

T

EmptyIfNull<T>(IReadOnlyList<T>)

public static IReadOnlyList<T> EmptyIfNull<T>(this IReadOnlyList<T> list)

Parameters

list IReadOnlyList<T>

Returns

IReadOnlyList<T>

Type Parameters

T

EmptyIfNull<T>(List<T>)

public static List<T> EmptyIfNull<T>(this List<T> list)

Parameters

list List<T>

Returns

List<T>

Type Parameters

T

EmptyIfNull<T>(Collection<T>)

public static Collection<T> EmptyIfNull<T>(this Collection<T> collection)

Parameters

collection Collection<T>

Returns

Collection<T>

Type Parameters

T

EmptyIfNull<T>(T[])

public static T[] EmptyIfNull<T>(this T[] array)

Parameters

array T[]

Returns

T[]

Type Parameters

T

EmptyIfNull<TKey, TValue>(Dictionary<TKey, TValue>)

public static Dictionary<TKey, TValue> EmptyIfNull<TKey, TValue>(this Dictionary<TKey, TValue> dict)

Parameters

dict Dictionary<TKey, TValue>

Returns

Dictionary<TKey, TValue>

Type Parameters

TKey
TValue

EmptyIfNull<TKey, TValue>(IDictionary<TKey, TValue>)

public static IDictionary<TKey, TValue> EmptyIfNull<TKey, TValue>(this IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

Returns

IDictionary<TKey, TValue>

Type Parameters

TKey
TValue

EmptyIfNull<TKey, TValue>(SortedDictionary<TKey, TValue>)

public static SortedDictionary<TKey, TValue> EmptyIfNull<TKey, TValue>(this SortedDictionary<TKey, TValue> dict)

Parameters

dict SortedDictionary<TKey, TValue>

Returns

SortedDictionary<TKey, TValue>

Type Parameters

TKey
TValue

IsEmpty(SearchResultList)

public static bool IsEmpty(this SearchResultList list)

Parameters

list SearchResultList

Returns

bool

IsEmpty(ICollection)

public static bool IsEmpty(this ICollection list)

Parameters

list ICollection

Returns

bool

IsEmpty(IList)

public static bool IsEmpty(this IList list)

Parameters

list IList

Returns

bool

IsEmpty(NameValueCollection)

public static bool IsEmpty(this NameValueCollection collection)

Parameters

collection NameValueCollection

Returns

bool

IsEmpty(StringDictionary)

public static bool IsEmpty(this StringDictionary dict)

Parameters

dict StringDictionary

Returns

bool

IsEmpty(PropertyDescriptorCollection)

public static bool IsEmpty(this PropertyDescriptorCollection collection)

Parameters

collection PropertyDescriptorCollection

Returns

bool

IsEmpty<T>(ICollection<T>)

public static bool IsEmpty<T>(this ICollection<T> collection)

Parameters

collection ICollection<T>

Returns

bool

Type Parameters

T

IsEmpty<T>(IList<T>)

public static bool IsEmpty<T>(this IList<T> list)

Parameters

list IList<T>

Returns

bool

Type Parameters

T

IsEmpty<T>(IReadOnlyList<T>)

public static bool IsEmpty<T>(this IReadOnlyList<T> list)

Parameters

list IReadOnlyList<T>

Returns

bool

Type Parameters

T

IsEmpty<T>(List<T>)

public static bool IsEmpty<T>(this List<T> list)

Parameters

list List<T>

Returns

bool

Type Parameters

T

IsEmpty<T>(Collection<T>)

public static bool IsEmpty<T>(this Collection<T> collection)

Parameters

collection Collection<T>

Returns

bool

Type Parameters

T

IsEmpty<T>(T[])

public static bool IsEmpty<T>(this T[] array)

Parameters

array T[]

Returns

bool

Type Parameters

T

IsEmpty<TKey, TValue>(Dictionary<TKey, TValue>)

public static bool IsEmpty<TKey, TValue>(this Dictionary<TKey, TValue> dict)

Parameters

dict Dictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

IsEmpty<TKey, TValue>(IDictionary<TKey, TValue>)

public static bool IsEmpty<TKey, TValue>(this IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

IsEmpty<TKey, TValue>(SortedDictionary<TKey, TValue>)

public static bool IsEmpty<TKey, TValue>(this SortedDictionary<TKey, TValue> dict)

Parameters

dict SortedDictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

IsNotEmpty(SearchResultList)

public static bool IsNotEmpty(this SearchResultList list)

Parameters

list SearchResultList

Returns

bool

IsNotEmpty(ICollection)

public static bool IsNotEmpty(this ICollection list)

Parameters

list ICollection

Returns

bool

IsNotEmpty(IList)

public static bool IsNotEmpty(this IList list)

Parameters

list IList

Returns

bool

IsNotEmpty(NameValueCollection)

public static bool IsNotEmpty(this NameValueCollection collection)

Parameters

collection NameValueCollection

Returns

bool

IsNotEmpty(StringDictionary)

public static bool IsNotEmpty(this StringDictionary dict)

Parameters

dict StringDictionary

Returns

bool

IsNotEmpty(PropertyDescriptorCollection)

public static bool IsNotEmpty(this PropertyDescriptorCollection collection)

Parameters

collection PropertyDescriptorCollection

Returns

bool

IsNotEmpty<T>(ICollection<T>)

public static bool IsNotEmpty<T>(this ICollection<T> collection)

Parameters

collection ICollection<T>

Returns

bool

Type Parameters

T

IsNotEmpty<T>(IList<T>)

public static bool IsNotEmpty<T>(this IList<T> list)

Parameters

list IList<T>

Returns

bool

Type Parameters

T

IsNotEmpty<T>(IReadOnlyList<T>)

public static bool IsNotEmpty<T>(this IReadOnlyList<T> list)

Parameters

list IReadOnlyList<T>

Returns

bool

Type Parameters

T

IsNotEmpty<T>(List<T>)

public static bool IsNotEmpty<T>(this List<T> list)

Parameters

list List<T>

Returns

bool

Type Parameters

T

IsNotEmpty<T>(Collection<T>)

public static bool IsNotEmpty<T>(this Collection<T> collection)

Parameters

collection Collection<T>

Returns

bool

Type Parameters

T

IsNotEmpty<T>(T[])

public static bool IsNotEmpty<T>(this T[] array)

Parameters

array T[]

Returns

bool

Type Parameters

T

IsNotEmpty<TKey, TValue>(Dictionary<TKey, TValue>)

public static bool IsNotEmpty<TKey, TValue>(this Dictionary<TKey, TValue> dict)

Parameters

dict Dictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

IsNotEmpty<TKey, TValue>(IDictionary<TKey, TValue>)

public static bool IsNotEmpty<TKey, TValue>(this IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

IsNotEmpty<TKey, TValue>(SortedDictionary<TKey, TValue>)

public static bool IsNotEmpty<TKey, TValue>(this SortedDictionary<TKey, TValue> dict)

Parameters

dict SortedDictionary<TKey, TValue>

Returns

bool

Type Parameters

TKey
TValue

NullIfEmpty(SearchResultList)

public static SearchResultList NullIfEmpty(this SearchResultList list)

Parameters

list SearchResultList

Returns

SearchResultList

NullIfEmpty(ICollection)

public static ICollection NullIfEmpty(this ICollection list)

Parameters

list ICollection

Returns

ICollection

NullIfEmpty(IList)

public static IList NullIfEmpty(this IList list)

Parameters

list IList

Returns

IList

NullIfEmpty(NameValueCollection)

public static NameValueCollection NullIfEmpty(this NameValueCollection collection)

Parameters

collection NameValueCollection

Returns

NameValueCollection

NullIfEmpty(PropertyDescriptorCollection)

public static PropertyDescriptorCollection NullIfEmpty(this PropertyDescriptorCollection collection)

Parameters

collection PropertyDescriptorCollection

Returns

PropertyDescriptorCollection

NullIfEmpty<T>(ICollection<T>)

public static ICollection<T> NullIfEmpty<T>(this ICollection<T> collection)

Parameters

collection ICollection<T>

Returns

ICollection<T>

Type Parameters

T

NullIfEmpty<T>(IEnumerable<T>)

public static IEnumerable<T> NullIfEmpty<T>(this IEnumerable<T> enumerable)

Parameters

enumerable IEnumerable<T>

Returns

IEnumerable<T>

Type Parameters

T

NullIfEmpty<T>(IList<T>)

public static IList<T> NullIfEmpty<T>(this IList<T> list)

Parameters

list IList<T>

Returns

IList<T>

Type Parameters

T

NullIfEmpty<T>(IReadOnlyList<T>)

public static IReadOnlyList<T> NullIfEmpty<T>(this IReadOnlyList<T> list)

Parameters

list IReadOnlyList<T>

Returns

IReadOnlyList<T>

Type Parameters

T

NullIfEmpty<T>(List<T>)

public static List<T> NullIfEmpty<T>(this List<T> list)

Parameters

list List<T>

Returns

List<T>

Type Parameters

T

NullIfEmpty<T>(Collection<T>)

public static Collection<T> NullIfEmpty<T>(this Collection<T> collection)

Parameters

collection Collection<T>

Returns

Collection<T>

Type Parameters

T

NullIfEmpty<T>(T[])

public static T[] NullIfEmpty<T>(this T[] array)

Parameters

array T[]

Returns

T[]

Type Parameters

T

NullIfEmpty<TKey, TValue>(Dictionary<TKey, TValue>)

public static Dictionary<TKey, TValue> NullIfEmpty<TKey, TValue>(this Dictionary<TKey, TValue> dict)

Parameters

dict Dictionary<TKey, TValue>

Returns

Dictionary<TKey, TValue>

Type Parameters

TKey
TValue

NullIfEmpty<TKey, TValue>(IDictionary<TKey, TValue>)

public static IDictionary<TKey, TValue> NullIfEmpty<TKey, TValue>(this IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

Returns

IDictionary<TKey, TValue>

Type Parameters

TKey
TValue

NullIfEmpty<TKey, TValue>(SortedDictionary<TKey, TValue>)

public static SortedDictionary<TKey, TValue> NullIfEmpty<TKey, TValue>(this SortedDictionary<TKey, TValue> dict)

Parameters

dict SortedDictionary<TKey, TValue>

Returns

SortedDictionary<TKey, TValue>

Type Parameters

TKey
TValue

TryGetItem<T>(IList<T>, int)

public static T TryGetItem<T>(this IList<T> list, int index)

Parameters

list IList<T>
index int

Returns

T

Type Parameters

T