Class KEFCoreRowBag<TKey>
- Namespace
- MASES.EntityFrameworkCore.KNet.Storage.Internal
- Assembly
- MASES.EntityFrameworkCore.KNet.dll
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public class KEFCoreRowBag<TKey> : IKEFCoreRowBag, IValueContainerData, IValueContainerMetadata where TKey : notnull
Type Parameters
TKey
- Inheritance
-
KEFCoreRowBag<TKey>
- Implements
- Inherited Members
Remarks
Default initializer
Constructors
KEFCoreRowBag(IUpdateEntry, string, TKey, IProperty[], IProperty[], object?[]?, IComplexProperty[]?, object?[]?)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public KEFCoreRowBag(IUpdateEntry entry, string topicName, TKey key, IProperty[] properties, IProperty[] flattenedProperties, object?[]? flattenedPropertyValues, IComplexProperty[]? complexProperties, object?[]? complexPropertyValues)
Parameters
entryIUpdateEntrytopicNamestringkeyTKeypropertiesIProperty[]flattenedPropertiesIProperty[]flattenedPropertyValuesobject[]complexPropertiesIComplexProperty[]complexPropertyValuesobject[]
Remarks
Default initializer
Properties
AssociatedTopicName
The topic data will be stored
public string AssociatedTopicName { get; }
Property Value
ComplexProperties
The IComplexProperty associated to EntityType
public IComplexProperty[]? ComplexProperties { get; }
Property Value
ComplexPropertyValues
The ValueBuffer containing all indexed values of the ComplexProperties
public object?[]? ComplexPropertyValues { get; }
Property Value
- object[]
EntityState
The EntityState associated to the EntityType
public EntityState EntityState { get; }
Property Value
EntityType
The IEntityType with changes
public IEntityType EntityType { get; }
Property Value
FlattenedProperties
The flattened IProperty associated to EntityType
public IProperty[] FlattenedProperties { get; }
Property Value
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; }
Property Value
Remarks
On this write-path type, the flattenedProperties constructor argument is always the entity's full set (never a query projection), so it is reused directly.
Properties
The IProperty associated to EntityType
public IProperty[] Properties { get; }
Property Value
PropertyValues
The ValueBuffer containing all indexed values of the FlattenedProperties
public object?[] PropertyValues { get; }
Property Value
- object[]
Remarks
Values are indexed and the first values are associated to Properties too
Methods
GetKey<TKeyLocal>()
The key associated to the current IKEFCoreRowBag
public TKeyLocal GetKey<TKeyLocal>() where TKeyLocal : notnull
Returns
- TKeyLocal
Type Parameters
TKeyLocal
GetValue<TKeyLocal, TValueContainer>(Func<IValueContainerData, IComplexTypeConverterFactory?, TValueContainer>, IComplexTypeConverterFactory)
The value associated to the current IKEFCoreRowBag
public TValueContainer? GetValue<TKeyLocal, TValueContainer>(Func<IValueContainerData, IComplexTypeConverterFactory?, TValueContainer> creator, IComplexTypeConverterFactory complexTypeConverterFactory) where TKeyLocal : notnull where TValueContainer : IValueContainer<TKeyLocal>
Parameters
creatorFunc<IValueContainerData, IComplexTypeConverterFactory, TValueContainer>complexTypeConverterFactoryIComplexTypeConverterFactory
Returns
- TValueContainer
Type Parameters
TKeyLocalTValueContainerThe IValueContainer<T> containing the converted data