Table of Contents

Class DictionaryExtensions

Namespace
Visus.AddressValidation.Extensions
Assembly
Visus.AddressValidation.dll

Contains extension methods for IDictionary<TKey, TValue> and IReadOnlyDictionary<TKey, TValue> instances.

public static class DictionaryExtensions
Inheritance
DictionaryExtensions
Inherited Members

Methods

Merge<TKey, TValue>(IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>)

Merges the elements from dictionary with the source.

public static void Merge<TKey, TValue>(this IDictionary<TKey, TValue> source, IReadOnlyDictionary<TKey, TValue> dictionary) where TKey : notnull

Parameters

source IDictionary<TKey, TValue>

The dictionary to merge with.

dictionary IReadOnlyDictionary<TKey, TValue>

The IReadOnlyDictionary<TKey, TValue> to merge from.

Type Parameters

TKey

The element type of the key.

TValue

The element type of the value.

Remarks

If the key already exists in source, the merge skips that element.