Fix awaitable response type comparison in async pipelines#43
Merged
hasanxdev merged 2 commits intohasanxdev:mainfrom Oct 8, 2025
Merged
Fix awaitable response type comparison in async pipelines#43hasanxdev merged 2 commits intohasanxdev:mainfrom
hasanxdev merged 2 commits intohasanxdev:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Owner
|
@wassim-k Thank you so much! It seems this issue exists. I’ll look into it and get back to this PR. |
wassim-k
commented
Oct 6, 2025
| namespace DispatchR.TestCommon.Fixtures.SendRequest; | ||
|
|
||
| public class AsyncEnumerablePipelineBehavior<TRequest, TResponse> | ||
| : INonGenericInterface, |
Contributor
Author
There was a problem hiding this comment.
This interface was added here to achieve 100% code coverage when searching for a matching pipeline interface:
pipeline.GetInterfaces().First(inter =>
inter.IsGenericType && // <=== This branch when `false`
inter.GetGenericTypeDefinition() == behaviorType).GenericTypeArguments[1]
Owner
|
@wassim-k Thank you for your great contributions to the development of this library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @hasanxdev,
I noticed another minor issue where if a pipeline behavior handles
Taskresponse type, the registrator still tries to register it against a request handler withValueTaskresponse type and vice versa, causing an exception "parameter constraint violation"I've also added an extra test for request handler with
IAsyncEnumerablereturn type to achieve 100% code coverage.