Class KEFCoreEntityTypeRocksDbExtensions
- Namespace
- MASES.EntityFrameworkCore.KNet.Extensions
- Assembly
- MASES.EntityFrameworkCore.KNet.dll
Extension methods for KEFCore RocksDB lifecycle metadata associated to entity types.
public static class KEFCoreEntityTypeRocksDbExtensions
- Inheritance
-
KEFCoreEntityTypeRocksDbExtensions
- Inherited Members
Methods
GetRocksDbLifecycleHandler(IReadOnlyEntityType)
Gets the RocksDB lifecycle handler instance associated to the entity type.
public static IRocksDbLifecycleHandler? GetRocksDbLifecycleHandler(this IReadOnlyEntityType entityType)
Parameters
entityTypeIReadOnlyEntityTypeThe entity type.
Returns
- IRocksDbLifecycleHandler
The configured handler instance, or null if no handler instance was configured.
GetRocksDbLifecycleHandlerType(IReadOnlyEntityType)
Gets the RocksDB lifecycle handler type associated to the entity type.
public static Type? GetRocksDbLifecycleHandlerType(this IReadOnlyEntityType entityType)
Parameters
entityTypeIReadOnlyEntityTypeThe entity type.
Returns
- Type
The handler type implementing IRocksDbLifecycleHandler, or null if no handler type was configured.
SetRocksDbLifecycleHandler(IConventionEntityType, IRocksDbLifecycleHandler?, bool)
Sets the RocksDB lifecycle handler instance associated to the entity type.
public static IRocksDbLifecycleHandler? SetRocksDbLifecycleHandler(this IConventionEntityType entityType, IRocksDbLifecycleHandler? handler, bool fromDataAnnotation = false)
Parameters
entityTypeIConventionEntityTypeThe convention entity type.
handlerIRocksDbLifecycleHandlerThe handler instance implementing IRocksDbLifecycleHandler, or null to remove the annotation.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- IRocksDbLifecycleHandler
The configured handler instance.
SetRocksDbLifecycleHandler(IMutableEntityType, IRocksDbLifecycleHandler?)
Sets the RocksDB lifecycle handler instance associated to the entity type.
public static void SetRocksDbLifecycleHandler(this IMutableEntityType entityType, IRocksDbLifecycleHandler? handler)
Parameters
entityTypeIMutableEntityTypeThe mutable entity type.
handlerIRocksDbLifecycleHandlerThe handler instance implementing IRocksDbLifecycleHandler, or null to remove the annotation.
SetRocksDbLifecycleHandlerType(IConventionEntityType, Type?, bool)
Sets the RocksDB lifecycle handler type associated to the entity type.
public static Type? SetRocksDbLifecycleHandlerType(this IConventionEntityType entityType, Type? handlerType, bool fromDataAnnotation = false)
Parameters
entityTypeIConventionEntityTypeThe convention entity type.
handlerTypeTypeThe handler type implementing IRocksDbLifecycleHandler, or null to remove the annotation.
fromDataAnnotationboolIndicates whether the configuration was specified using a data annotation.
Returns
- Type
The configured handler type.
Exceptions
- ArgumentException
Thrown when
handlerTypedoes not implement IRocksDbLifecycleHandler.
SetRocksDbLifecycleHandlerType(IMutableEntityType, Type?)
Sets the RocksDB lifecycle handler type associated to the entity type.
public static void SetRocksDbLifecycleHandlerType(this IMutableEntityType entityType, Type? handlerType)
Parameters
entityTypeIMutableEntityTypeThe mutable entity type.
handlerTypeTypeThe handler type implementing IRocksDbLifecycleHandler, or null to remove the annotation.
Exceptions
- ArgumentException
Thrown when
handlerTypedoes not implement IRocksDbLifecycleHandler.