Closed DaveRMaltby closed 2 years ago
Fixed in #413
@DaveRMaltby, new version released with your PR changes: https://www.nuget.org/packages/Bogus/34.0.2
thanks again for the help!
Thank you sir! I'm glad now to be able to return to your NuGet package. I really like your work here. If you need some help on stuff keep me in mind. Again, appreciate it!
Please describe why you are requesting a feature
Different PRNGs have different tradeoffs on CPU, memory and distribution of results. Bogus is currently bound to using the .NET Random class which is constrained to only one PRNG algorithm (See remarks of the previous link). Bogus is designed in such a manner that adding this feature requires minimal changes.
Please provide a code example of what you are trying to achieve
NOTE: The PRNG here (called PseudoRandomNumberGenerator) is only for simplicity and does not at all represent the standard or custom PRNGs that I'd like to use in my final code.
Please answer any or all of the questions below
Is the feature something that currently cannot be done? Yes. The .NET Random class is used directly in the Bogus' Randomizer class. The final Pull Request will abstract that into an interface as shown in the code example above.
What alternatives have you considered? Forking a personal copy of Bogus for modification. I currently see no workaround without modifying a copy of the Bogus source code and compiling on my own.
Is this feature request any issues or current problems? Not that I'm aware of.
Has the feature been requested in the past? The closest issues that I can find deal with work at optimizing Bogus algorithms or deal with the lack of currency support in Microsoft's Random class.
If the feature request is approved, would you be willing to submit a PR? Yes. I already have a working solution and will provide some unit tests as well.