Releases: RobThree/IdGen
NetStandard 1.1+ support, new IdGen.Configuration package, bugfix
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(...)
Minor changes
- Added
FromId()
method to 'decode' an Id - Minor internal refactoring
Flexible 'ticks'
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 the MaskConfig
's method signatures.
The IIdGenerator<T>
interface now explicitly exposes an IdGenerator
's ITimeSource
, MaskConfig
and Epoch
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.
Improved DefaultTimeSource
Moved away from DateTime.UtcNow and implemented a better, millisecond resolution, DefaultTimeSource using QueryPerformanceCounter.
Initial release
* Created documentation welcome page * 1.0.0 release