Table of Contents

CopyTo Method

Definition

CopyTo<TKey, TValue>(IDecorator<IDictionary<TKey, TValue>>, IDictionary<TKey, TValue>)

Copies all elements from the enclosed IDictionary<TKey, TValue> of decorator to destination.

public static IDictionary<TKey, TValue> CopyTo<TKey, TValue>(this IDecorator<IDictionary<TKey, TValue>> decorator, IDictionary<TKey, TValue> destination)

Parameters

decorator IDecorator<IDictionary<TKey, TValue>>

The IDecorator<T> to extend.

destination IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to which the elements of the enclosed IDictionary<TKey, TValue> will be copied.

Returns

IDictionary<TKey, TValue>

An IDictionary<TKey, TValue> that is the result of the populated destination.

Type Parameters

TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.

CopyTo<TKey, TValue>(IDecorator<IDictionary<TKey, TValue>>, IDictionary<TKey, TValue>, Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>>)

Copies elements from the enclosed IDictionary<TKey, TValue> of decorator to destination using the copier delegate.

public static IDictionary<TKey, TValue> CopyTo<TKey, TValue>(this IDecorator<IDictionary<TKey, TValue>> decorator, IDictionary<TKey, TValue> destination, Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>> copier)

Parameters

decorator IDecorator<IDictionary<TKey, TValue>>

The IDecorator<T> to extend.

destination IDictionary<TKey, TValue>

The IDictionary<TKey, TValue> to which the elements of the enclosed IDictionary<TKey, TValue> will be copied.

copier Action<IDictionary<TKey, TValue>, IDictionary<TKey, TValue>>

The delegate that will populate a copy of the enclosed IDictionary<TKey, TValue> to the specified destination.

Returns

IDictionary<TKey, TValue>

An IDictionary<TKey, TValue> that is the result of the populated destination.

Type Parameters

TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.