HiLoValueGenerator<TValue> HiLoValueGenerator(Of TValue) Class

Acts as a ValueGenerator by requesting a block of values from the underlying database and returning them one by one. Will ask the underlying database for another block when the current block is exhausted.

A block is represented by a low value fetched from the database, and then a block size that indicates how many sequential values can be used, starting from the low value, before a new low value must be fetched from the database.

Syntax

Declaration

public abstract class HiLoValueGenerator<TValue> : ValueGenerator<TValue>Public MustInherit Class HiLoValueGenerator(Of TValue)
    Inherits ValueGenerator(Of TValue)

Type Parameters

TValue The type of values that are generated.

Inheritance Hierarchy

Inherited Members

NextValue(EntityEntry),
NextValue(EntityEntry),
NextValueAsync(EntityEntry, CancellationToken),
NextValueAsync(EntityEntry, CancellationToken),
GeneratesTemporaryValues,
GeneratesTemporaryValues,
ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Initializes a new instance of the HiLoValueGenerator<TValue> class.

Methods summary

Gets the low value for the next block of values to be used.

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

Gets a value to be assigned to a property.

Gets a value to be assigned to a property.

Constructors

  • HiLoValueGenerator(HiLoValueGeneratorState)
    HiLoValueGenerator(HiLoValueGeneratorState)

    Initializes a new instance of the HiLoValueGenerator<TValue> class.

    protected HiLoValueGenerator(HiLoValueGeneratorState generatorState)Protected Sub New(generatorState As HiLoValueGeneratorState)

    Parameters

Methods

  • GetNewLowValue()
    GetNewLowValue()

    Gets the low value for the next block of values to be used.

    protected abstract long GetNewLowValue()Protected MustOverride Function GetNewLowValue As Long

    Returns

    • System.Int64
      System.Int64

      The low value for the next block of values to be used.

  • GetNewLowValueAsync(CancellationToken)
    GetNewLowValueAsync(CancellationToken)

    This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

    protected virtual Task<long> GetNewLowValueAsync(CancellationToken cancellationToken = null)Protected Overridable Function GetNewLowValueAsync(cancellationToken As CancellationToken = Nothing) As Task(Of Long)

    Parameters

    • cancellationToken
      System.Threading.CancellationToken
      System.Threading.CancellationToken

    Returns

    • System.Threading.Tasks.Task<TResult><System.Int64>
      System.Threading.Tasks.Task<TResult>(Of System.Int64)
  • Next(EntityEntry)
    Next(EntityEntry)

    Gets a value to be assigned to a property.

    public override TValue Next(EntityEntry entry)Public Overrides Function Next(entry As EntityEntry) As TValue

    Parameters

    Returns

    • TValue
      TValue

      The value to be assigned to a property.

  • NextAsync(EntityEntry, CancellationToken)
    NextAsync(EntityEntry, CancellationToken)

    Gets a value to be assigned to a property.

    public override Task<TValue> NextAsync(EntityEntry entry, CancellationToken cancellationToken = null)Public Overrides Function NextAsync(entry As EntityEntry, cancellationToken As CancellationToken = Nothing) As Task(Of TValue)

    Parameters

    • entry
    • cancellationToken
      System.Threading.CancellationToken
      System.Threading.CancellationToken

    Returns

    • System.Threading.Tasks.Task<TResult><TValue>
      System.Threading.Tasks.Task<TResult>(Of TValue)

      The value to be assigned to a property.

Details

Assembly

Microsoft.EntityFrameworkCore.dll