-
Couldn't load subscription status.
- Fork 2
Augment: IHasRandomValueGenerator #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I'm (not) sorry
Added an unmanaged implementation IHasUnmanagedRandomValueGenerator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides having to adapt this code to latest main, I don't think IHasRandomValueGenerator should have a TRandom type argument. 99.999999% of the time it's going to be System.Random. If you remove the type argument, we can also use Random.Shared instead of instantiating a new Random object every time.
src/TransparentValueObjects.Augments/IHasRandomValueGenerator.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # tests/TransparentValueObjects.Tests/ValueObjectIncrementalSourceGeneratorTests/BaseTests.cs
Removed GenerateRandomValue Added GetRandom
|
Should be up to date now |
I'm (not) sorry
We also need tests for unmanaged/int types