ValueGeneratorSelector ValueGeneratorSelector Class

Definition

Selects value generators to be used to generate values for properties of entities.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public class ValueGeneratorSelector : IValueGeneratorSelector
Public Class ValueGeneratorSelector
    Implements IValueGeneratorSelector
Inheritance
System.ObjectSystem.Object
ValueGeneratorSelectorValueGeneratorSelector
Implements

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Constructors

ValueGeneratorSelector(IValueGeneratorCache) ValueGeneratorSelector(IValueGeneratorCache)

Initializes a new instance of the ValueGeneratorSelector class.

public ValueGeneratorSelector(IValueGeneratorCache cache)
Public Sub New(cache As IValueGeneratorCache)
Parameters
cache
IValueGeneratorCache IValueGeneratorCache

The cache to be used to store value generator instances.

Properties

Cache Cache

The cache being used to store value generator instances.

public virtual IValueGeneratorCache Cache { get; }
Public Overridable ReadOnly Property Cache As IValueGeneratorCache

Methods

Create(IProperty, IEntityType) Create(IProperty, IEntityType)

Creates a new value generator for the given property.

public virtual ValueGenerator Create(IProperty property, IEntityType entityType)
Public Overridable Function Create(property As IProperty, entityType As IEntityType) As ValueGenerator
Parameters
property
IProperty IProperty

The property to get the value generator for.

entityType
IEntityType IEntityType

The entity type that the value generator will be used for. When called on inherited properties on derived entity types, this entity type may be different from the declared entity type on property

Returns

The newly created value generator.

Select(IProperty, IEntityType) Select(IProperty, IEntityType)

Selects the appropriate value generator for a given property.

public virtual ValueGenerator Select(IProperty property, IEntityType entityType)
Public Overridable Function Select(property As IProperty, entityType As IEntityType) As ValueGenerator
Parameters
property
IProperty IProperty

The property to get the value generator for.

entityType
IEntityType IEntityType

The entity type that the value generator will be used for. When called on inherited properties on derived entity types, this entity type may be different from the declared entity type on property

Returns

The value generator to be used.