Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RobThree authored Nov 23, 2016
1 parent 8daa485 commit c0ded9d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ Wraparound interval : 407226.12:41:28.8320000 (about 1114 years)
Wraparound date : 3130-03-13T12:41:28.8320000Z
```

IdGen also provides an `ITimeSouce` interface; this can be handy for [unittesting](IdGenTests/IdGenTests.cs) purposes or if you want to provide a time-source for the timestamp part of your Id's that is not based on the system time. By default the IdGenerator uses the `DefaultTimeSource` which, internally, uses [`QueryPerformanceCounter`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms644904.aspx). For unittesting we use our own [`MockTimeSource`](IdGenTests/MockTimeSource.cs).
IdGen also provides an `ITimeSouce` interface; this can be handy for [unittesting](IdGenTests/IdGenTests.cs) purposes or if you want to provide a time-source for the timestamp part of your Id's that is not based on the system time. For unittesting we use our own [`MockTimeSource`](IdGenTests/MockTimeSource.cs).

The following constructor overloads are available:

```c#
IdGenerator(int generatorId)
IdGenerator(int generatorId, DateTimeOffset epoch)
IdGenerator(int generatorId, DateTimeOffset epoch, MaskConfig maskConfi)
IdGenerator(int generatorId, ITimeSource timeSource)
IdGenerator(int generatorId, DateTime epoch)
IdGenerator(int generatorId, DateTime epoch, ITimeSource timeSource)
IdGenerator(int generatorId, DateTime epoch, MaskConfig maskConfig)
IdGenerator(int generatorId, DateTime epoch, MaskConfig maskConfig, ITimeSource timeSource)
IdGenerator(int generatorId, MaskConfig maskConfig)
IdGenerator(int generatorId, MaskConfig maskConfig, ITimeSource timeSource)
```

All properties are read-only to prevent changes once an `IdGenerator` has been instantiated.
Expand Down Expand Up @@ -162,4 +162,4 @@ You can get the IdGenerator from the config using the following code:

[![Build status](https://ci.appveyor.com/api/projects/status/24wqqq91u0arkf5t)](https://ci.appveyor.com/project/RobIII/idgen) <a href="https://www.nuget.org/packages/IdGen/"><img src="http://img.shields.io/nuget/v/IdGen.svg?style=flat-square" alt="NuGet version" height="18"></a> <a href="https://www.nuget.org/packages/IdGen/"><img src="http://img.shields.io/nuget/dt/IdGen.svg?style=flat-square" alt="NuGet downloads" height="18"></a>

Icon made by [Freepik](http://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com) is licensed by [CC 3.0](http://creativecommons.org/licenses/by/3.0/).
Icon made by [Freepik](http://www.flaticon.com/authors/freepik) from [www.flaticon.com](http://www.flaticon.com) is licensed by [CC 3.0](http://creativecommons.org/licenses/by/3.0/).

0 comments on commit c0ded9d

Please sign in to comment.