Show / Hide Table of Contents

Class TypeWrapperCollection<TWrapper, TWrapped, TOriginal>

A collection of wrappers.

Inheritance
System.Object
TypeWrapperCollection<TWrapper, TWrapped, TOriginal>
Namespace: MAT.Atlas.Api.Core
Assembly: MAT.Atlas.Api.Core.dll
Syntax
public sealed class TypeWrapperCollection<TWrapper, TWrapped, TOriginal> : ValueType where TWrapper : TypeWrapperBase<TWrapper, TWrapped, TOriginal>, TWrapped, new()
    where TOriginal : class
Type Parameters
Name Description
TWrapper

The wrapper type for elements of the original collection.

TWrapped

The type when wrapped.

TOriginal

The original type that is being wrapped.

Properties

Instances

The original instances collection.

Declaration
public IReadOnlyList<TOriginal> Instances { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<TOriginal>

Wrappers

The wrapped instances collection as wrappers.

Declaration
public IReadOnlyList<TWrapper> Wrappers { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<TWrapper>

Methods

ToWrapper(IReadOnlyList<TOriginal>, TypeWrapperCollection<TWrapper, TWrapped, TOriginal>)

Create/update wrapper from original instances collection.

Declaration
public static TypeWrapperCollection<TWrapper, TWrapped, TOriginal> ToWrapper(IReadOnlyList<TOriginal> instances, TypeWrapperCollection<TWrapper, TWrapped, TOriginal> wrapper)
Parameters
Type Name Description
System.Collections.Generic.IReadOnlyList<TOriginal> instances

The original instances collection.

TypeWrapperCollection<TWrapper, TWrapped, TOriginal> wrapper

The wrapper.

Returns
Type Description
TypeWrapperCollection<TWrapper, TWrapped, TOriginal>

The wrapper.

Remarks

A new wrapper collection is assigned when instances collection reference has changed to ensure standard object identity rules apply.

A new wrapper collection is assigned when the instances collection contents have changed, to prevent concurrent iteration exceptions.

In This Article
Back to top Generated by DocFX