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
flattenedPropertiesIProperty[]The IProperty from the GetFlattenedProperties()
rootTypeIEntityTypeThe root IEntityType
propertiesInfoIDictionary<IPropertyBase, object>The data associated to the base properties
complexPropertiesInfoIDictionary<IComplexProperty, object>The data associated to the first level complex properties
allPropertyValuesobject[]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
rootITypeBasecomplexTypeIComplexTypetraversedPropertiesIList<IComplexProperty>