Show / Hide Table of Contents

Class DefaultIdGenerator

The default implementation of an identifier generator.

Inheritance
System.Object
DefaultIdGenerator
Implements
IIdGenerator
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultIdGenerator : IIdGenerator

Constructors

| Improve this Doc View Source

DefaultIdGenerator(IConfiguration<IdGeneratorSettings>)

Initializes a new instance of the DefaultIdGenerator class.

Declaration
public DefaultIdGenerator(IConfiguration<IdGeneratorSettings> configuration)
Parameters
Type Name Description
IConfiguration<IdGeneratorSettings> configuration

The configuration.

Methods

| Improve this Doc View Source

GenerateDiscriminator(ref Int64)

Generates the discriminator part for the relative timestamp.

Declaration
protected int GenerateDiscriminator(ref long relativeTimestamp)
Parameters
Type Name Description
System.Int64 relativeTimestamp

The relative timestamp.

Returns
Type Description
System.Int32

The discriminator part of the ID.

Remarks

The relative timestamp may be adjusted to avoid collisions.

| Improve this Doc View Source

GenerateId()

Generates the 52-bit identifier. This is due to the fact that JavaScript can read accurately only integers up to 2^53, values greater than that will get truncated. See http://stackoverflow.com/questions/5353388/javascript-parsing-int64 for more info.

Declaration
public long GenerateId()
Returns
Type Description
System.Int64

The unique identifier.

Implements

IIdGenerator

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX