Table of Contents

Class KeyItemCollectionExtensions

Namespace
Loehnert.TypeAndResult
Assembly
Loehnert.TypeAndResult.dll

Extensions for KeyItemCollection<T>.

public static class KeyItemCollectionExtensions
Inheritance
KeyItemCollectionExtensions
Inherited Members

Methods

ApplyIds<T>(KeyItemCollection<T>, KeyItemCollection<T>)

Applies all ID from sourceItems to targetItems. See ApplyID(T).

public static void ApplyIds<T>(this KeyItemCollection<T> targetItems, KeyItemCollection<T> sourceItems) where T : EntityBase, IHasKey, IEquatable<T>, ICanApplyID<T>

Parameters

targetItems KeyItemCollection<T>

A collection that contains the target items.

sourceItems KeyItemCollection<T>

A collection that contains the source items.

Type Parameters

T

The type of objects to apply the ID.

Exceptions

InvalidOperationException

Thrown when targetItems doesn't equals with sourceItems.

ArgumentNullException

Thrown when sourceItems or targetItems is null.