WTDawson.PersistentID is my library that I built in C#. It’s designed to make it easier to build IDs that are replicable (Generate the same ID more than once).
If you haven’t read my post about using the library, I suggest you do: Using WTDawson.PersistentID to build replicable IDs.
Below is a the test application run with the argument “-c”. The tests show that the IDs generated match the ones built in (Using the same data). This shows that the library can regenerate IDs based on the same data.

How does it work?
When you create an IDBuilder
instance, it allows you to set values such as the “magic”, length, rules and add items (As the data). Upon converting the IDBuilder
instance to a string, it builds the ID. When the ID is being built, it generates two things:
- A list of characters generated using the set rules (
Upper
,Lower
,Numerical
, andSpecial
). It determines what should be included. - It then converts the objects to characters and removes any duplicates and adds them to the list of characters.
- The random algorithm is then used with the seed set by the “magic” number (Also known as the key) to pick out of the available characters.
- It then adds the picked characters to a string and returns it.
Discover more from WTDawson
Subscribe to get the latest posts sent to your email.