Table of Contents

Class ValueContainerMetadata

Namespace
MASES.EntityFrameworkCore.KNet.Serialization
Assembly
MASES.EntityFrameworkCore.KNet.Serialization.dll
public record ValueContainerMetadata : IValueContainerMetadata, IEquatable<ValueContainerMetadata>
Inheritance
ValueContainerMetadata
Implements
Inherited Members

Constructors

ValueContainerMetadata(IEntityType, IProperty[]?, IProperty[]?, IComplexProperty[]?)

public ValueContainerMetadata(IEntityType entityType, IProperty[]? properties = null, IProperty[]? flattenedProperties = null, IComplexProperty[]? complexProperties = null)

Parameters

entityType IEntityType

EntityType

properties IProperty[]

Properties

flattenedProperties IProperty[]

FlattenedProperties

complexProperties IComplexProperty[]

ComplexProperties

Properties

ComplexProperties

The IComplexProperty associated to EntityType

public IComplexProperty[]? ComplexProperties { get; init; }

Property Value

IComplexProperty[]

EntityType

The IEntityType with changes

public IEntityType EntityType { get; init; }

Property Value

IEntityType

FlattenedProperties

The flattened IProperty associated to EntityType

public IProperty[] FlattenedProperties { get; init; }

Property Value

IProperty[]

FullFlattenedProperties

The full, unfiltered flattened IProperty set of EntityType — i.e. what EntityType.GetFlattenedProperties() returns, independent of any projection narrowing applied to FlattenedProperties. Exposed as the array itself (not just its length) so it can be reused for other purposes beyond sizing a buffer. Implementations should compute this once when the metadata instance is built (once per query for a projected/filtered metadata, once per entity type for the shared full metadata), not on every call: IValueContainer.GetData reads FullFlattenedProperties.Length once per deserialized record to size its output ValueBuffer, since flattened properties are addressed by GetIndex(), an index relative to the full flattened set regardless of any projection.

public IProperty[] FullFlattenedProperties { get; init; }

Property Value

IProperty[]

Remarks

Always derived from EntityType directly, computed once here at construction — deliberately NOT derived from the (possibly projected) FlattenedProperties constructor argument, which may be a narrower subset when this metadata was built to restrict deserialization to a query's projection (see the projection push-down design). This must always be the entity's true, full flattened property set. Declared before FlattenedProperties so the latter's initializer can reuse this same array instance (rather than re-enumerating) whenever no projected subset was supplied.

Properties

The IProperty associated to EntityType

public IProperty[] Properties { get; init; }

Property Value

IProperty[]