Table of Contents

Class ComplexTypeExtension

Namespace
MASES.EntityFrameworkCore.KNet.Serialization
Assembly
MASES.EntityFrameworkCore.KNet.Serialization.dll

Extension methods for flattened properties preparation

public static class ComplexTypeExtension
Inheritance
ComplexTypeExtension
Inherited Members

Methods

FillFlattened(IProperty[], IEntityType, IDictionary<IPropertyBase, object>, IDictionary<IComplexProperty, object>, ref object[])

Fills allPropertyValues using information in propertiesInfo and complexPropertiesInfo base on flattenedProperties

public static void FillFlattened(this IProperty[] flattenedProperties, IEntityType rootType, IDictionary<IPropertyBase, object> propertiesInfo, IDictionary<IComplexProperty, object> complexPropertiesInfo, ref object[] allPropertyValues)

Parameters

flattenedProperties IProperty[]

The IProperty from the GetFlattenedProperties()

rootType IEntityType

The root IEntityType

propertiesInfo IDictionary<IPropertyBase, object>

The data associated to the base properties

complexPropertiesInfo IDictionary<IComplexProperty, object>

The data associated to the first level complex properties

allPropertyValues object[]

All data to be returned

FindRootProperty(ITypeBase, IComplexType, IList<IComplexProperty>)

Walks up the complex-type ownership chain of complexType until it finds the first-level IComplexProperty declared directly on root. Public (not internal) so it can be reused by other SerDes implementations (Avro, Protobuf, ...) living in separate assemblies, to determine from a flattened IProperty which root complex property it ultimately belongs to — see each IValueContainer.GetData implementation.

public static IComplexProperty FindRootProperty(ITypeBase root, IComplexType complexType, IList<IComplexProperty> traversedProperties)

Parameters

root ITypeBase
complexType IComplexType
traversedProperties IList<IComplexProperty>

Returns

IComplexProperty