Changelog History
-
v3.0.0 Changes
July 06, 2020๐ This release contains a few (minor) breaking changes. Generated 2.x ID's are still compatible with 3.x ID's.
- Most of the constructor overloads for the
IdGenerator
have been replaced with a single constructor which acceptsIdGeneratorOptions
that contains theITimeSource
,IdStructure
andSequenceOverflowStrategy
. - The
MaskConfig
class is now more appropriately namedIdStructure
since it describes the structure of the generated ID's. - ๐ The
UseSpinWait
property has moved to theIdGeneratorOptions
and is now an enum of typeSequenceOverflowStrategy
instead of a boolean value. Note that this property has also been renamed in the config file (fromuseSpinWait
tosequenceOverflowStrategy
) and is no longer a boolean butrequires
one of the values fromSequenceOverflowStrategy
. ID
is nowId
(only used as return value by theFromId(...)
method)
- Most of the constructor overloads for the
-
v2.4.1 Changes
July 02, 2020๐ง The
IdGenerator
now offers a spinwaiting strategy when a sequenceoverflow occurs instead of throwing aSequenceOverflowException
. This will spinwait until the next tick and then return a new Id. New constructoroverloads have been added to be able to set this property at construction time. Also the configuration package supports this new option with auseSpinWait
attribute on theidGenerator
element. -
v2.4 Changes
July 02, 2020๐ Fix concurrency issue (see PR #23). Upped version.
-
v2.3 Changes
April 20, 2020 -
v2.1 Changes
February 19, 2020๐ Changes:
- ๐ Support for NetStandard 1.1+
- ๐ง Moved AppConfig stuff to separate
IDGen.Configuration
package -
ID
now implementsIEquatable
- ๐ Fixed some
ArgumentOutOfRangeExceptions
from theIdGenerator
's ctor messages - ๐ Fixed bug (see #18) where internal timer was started only on first use instead of on instantiation. Thanks @stuart-beattie!
- ๐จ Minor internal cleanup / refactoring
๐ฅ Breaking changes:
If you're using the
IdGenerator.GetFromConfig(...)
method make sure you check the README. The changes aren't big, but breaking nonetheless. How to fix:- ๐ง Install
IdGen.Configuration
package - ๐ Change the configsection type from:
๐งIdGen.Configuration.IdGeneratorsSection, IdGen
to:
๐งIdGen.Configuration.IdGeneratorsSection, IdGen.Configuration
- โ Add a
using IdGen.Configuration
- ๐ Change
IdGenerator.GetFromConfig(...)
toAppConfigFactory.GetFromConfig(...)
-
v2.0.3 Changes
August 02, 2018- โ Added
FromId()
method to 'decode' an Id - ๐จ Minor internal refactoring
- โ Added
-
v2.0.1 Changes
November 23, 2016๐ Timesource(s) is (are) no longer fixed to 'millisecond resolution'; we now have the concept of a 'tick'. Each timesource can define it's own definition of what a 'tick' is, be it a millisecond or a minute or any other timespan.
This means breaking changes in the
ITimeSource
interface and the way timesources are implemented and breaking changes in some of theMaskConfig
's method signatures.The
IIdGenerator<T>
interface now explicitly exposes anIdGenerator
'sITimeSource
,MaskConfig
andEpoch
as (read-only) properties.๐
CreateMachineSpecificGenerator()
&CreateThreadSpecificGenerator()
methods have been removed; these are way to 'dangerous' to use anyway since they are very prone to 'collisions' in 'auto-generated' values for the IdGenerators. -
v1.1 Changes
June 29, 2015๐ Moved away from DateTime.UtcNow and implemented a better, millisecond resolution, DefaultTimeSource using QueryPerformanceCounter.
-
v1.0
April 08, 2015