Class CollectionExtensions
Extension methods for collections.
Inheritance
System.Object
CollectionExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Collections
Assembly: Kephas.Core.dll
Syntax
public static class CollectionExtensions
Methods
| Improve this Doc View SourceAddRange<T>(IProducerConsumerCollection<T>, IEnumerable<T>)
Adds a range of items to the collection.
Declaration
public static IProducerConsumerCollection<T> AddRange<T>(this IProducerConsumerCollection<T> collection, IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Concurrent.IProducerConsumerCollection<T> | collection | The collection. |
System.Collections.Generic.IEnumerable<T> | items | The items. |
Returns
Type | Description |
---|---|
System.Collections.Concurrent.IProducerConsumerCollection<T> | The provided collection for method chaining. |
Type Parameters
Name | Description |
---|---|
T | The type of the item. |
AddRange<T, TItem>(T, IEnumerable<TItem>)
Adds a range of items to the collection.
Declaration
public static T AddRange<T, TItem>(this T collection, IEnumerable<TItem> items)
where T : class, ICollection<TItem>
Parameters
Type | Name | Description |
---|---|---|
T | collection | The collection. |
System.Collections.Generic.IEnumerable<TItem> | items | The items. |
Returns
Type | Description |
---|---|
T | The provided collection for method chaining. |
Type Parameters
Name | Description |
---|---|
T | The collection type. |
TItem | The type of the item. |