Table of Contents

Class CollectionDecoratorExtensions

Namespace
Cuemon.Collections.Generic
Assembly
Cuemon.Core.dll

Extension methods for the System.Collections.Generic.ICollection<T> interface hidden behind the IDecorator<T> interface.

public static class CollectionDecoratorExtensions
Inheritance
Object
CollectionDecoratorExtensions

Methods

AddRange<T>(IDecorator<ICollection<T>>, T[])

Adds the elements of the specified source to the enclosed System.Collections.Generic.ICollection<T> of the decorator.

public static void AddRange<T>(this IDecorator<ICollection<T>> decorator, params T[] source)

Parameters

decorator IDecorator<ICollection<T>>

The IDecorator{ICollection{T}} to extend.

source T[]

The sequence of elements that should be added to the enclosed System.Collections.Generic.ICollection<T> of the decorator.

Type Parameters

T

The type of elements in the System.Collections.Generic.ICollection<T>.

Exceptions

System.ArgumentNullException

decorator cannot be null.

AddRange<T>(IDecorator<ICollection<T>>, IEnumerable<T>)

Adds the elements of the specified source to the enclosed System.Collections.Generic.ICollection<T> of the decorator.

public static void AddRange<T>(this IDecorator<ICollection<T>> decorator, IEnumerable<T> source)

Parameters

decorator IDecorator<ICollection<T>>

The IDecorator{ICollection{T}} to extend.

source IEnumerable<T>

The sequence of elements that should be added to the enclosed System.Collections.Generic.ICollection<T> of the decorator.

Type Parameters

T

The type of elements in the System.Collections.Generic.ICollection<T>.

Exceptions

System.ArgumentNullException

decorator cannot be null.

See Also