MisterJames / GenFu

GenFu is a library you can use to generate realistic test data. It is composed of several property fillers that can populate commonly named properties through reflection using an internal database of values or randomly created data. You can override any of the fillers, give GenFu hints on how to fill them.
Other
831 stars 100 forks source link

Multi thread #133

Closed marcoregueira closed 5 years ago

marcoregueira commented 6 years ago

This requests makes GenFu thread safe, allowing shared access to registration engine. Of course that doesn't means deterministic: if active threads register different rules for each type it could cause interferences because of the shared static storage.

There are two commits in this request.

First one: Add tests. They are all red. Second: Go for green.

ScarletKuro commented 5 years ago

Why this is not merged? Looks like the author doesn't develop this library actively anymore. This problems (https://github.com/MisterJames/GenFu/issues/143) (https://github.com/MisterJames/GenFu/issues/143) are pain in the ass

marcoregueira commented 5 years ago

@ScarletKuro You can use https://www.nuget.org/packages/GenFu.Instantiable.NonOfficial/1.3.4-preview.

Aside of thread safety it adds support for creating Genfu instances.

Source code is here, https://www.nuget.org/packages/GenFu.Instantiable.NonOfficial/1.3.4-preview, if you prefer to build the code yourself.

================================================ Edit. Mobile devices are evil and my fingers too big. Source code is here. :) https://github.com/marcoregueira/genfu