23.206. Class MaskedProjection

Namespace: ArmoniK.Core.Common.Storage
Assembly: ArmoniK.Core.Common.dll

Class to create projection from one type to another with a mask to choose the fields to fill in

public static class MaskedProjection

23.206.1. Inheritance

objectMaskedProjection

23.206.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

23.206.3. Methods

23.206.3.1. CreateMaskedProjection<TField, TOrigin, TDest>(IEnumerable<TField>, Func<TField, Expression<Func<TOrigin, object?>>>, Func<TField, Expression<Func<TDest, object?>>>, IEnumerable<MemberAssignment>?)

Builds an that converts from TOrigin to TDest with a mask to select the fields to fill in TDest

public static Expression<Func<TOrigin, TDest>> CreateMaskedProjection<TField, TOrigin, TDest>(IEnumerable<TField> fields, Func<TField, Expression<Func<TOrigin, object?>>> toOrigin, Func<TField, Expression<Func<TDest, object?>>> toDest, IEnumerable<MemberAssignment>? assignments = null) where TField : Enum

23.206.3.1.1. Parameters

fields IEnumerable<TField>

representing the fields selected to form the mask

toOrigin Func<TField, Expression<Func<TOrigin, object?>>>

Function that gives the expression to convert the TField to a member of TOrigin

toDest Func<TField, Expression<Func<TDest, object?>>>

Function that gives the expression to convert the TField to a member of TDest

assignments IEnumerable<MemberAssignment>?

Additional assignments to perform when building TDest

23.206.3.1.2. Returns

Expression<Func<TOrigin, TDest>>

The to convert a TOrigin to TDest with the given mask

23.206.3.1.3. Type Parameters

TField

that represents the fields to select

TOrigin

Type holding the data

TDest

Type in which to put the selected data