-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat: Support batch enforce and add corresponding test. #274
Conversation
@sagilio please review |
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.
LGTM
2919c49
to
c107068
Compare
@AsakusaRinne fix: |
c107068
to
e920931
Compare
e920931
to
ab645e5
Compare
🎉 This PR is included in version 2.0.0-preview.5 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Support batch enforce and add corresponding test. #166
It used async stream to implement
BatchEnforceAsync
exceptNET452
.It added
BatchEnforceParallel
inEnforcer
without a corresponding interface inIEnforcer
. I'm not sure about the design here. What I think is that its only a special implementation so that adding it toIEnforcer
may mean little.As for the extension, I only provide methods which accept generic type inherited from
IRequestValues
. The reason is that if I provide similar API with that ofEnforceExtension.GenericEnforce
, users need to pass severalIEnumerable
, such ase.BatchEnforce(List<T1>, List<T2>, List<T3>)
. Thus, consistency of the parameters is not actually ensured, which I think may not be a good practice. Please give some suggestions about it.I'll PR a benchmark of it if the design is approved finally.