#1014 Pipeline and Services Abstractions #1020
Closed
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.
closes: #1014
I have created 2 new abstraction packages/projects:
MediatR.Pipeline
andMediatR.Services
(feel free to rename them). I have leftMediatR
andMediatR.Contracts
untouched and have includedMediatR.Contracts
as a NuGet package dependency on the new packages.Eventually,
MediatR
can include these 2 new NuGet packages as dependencies and remove the duplicate interfaces from its source code.I left out the interfaces used in
MediatR
inside theMediatR.Pipeline
namespace because they're more coupled with pipeline-related concepts and I don't think these are being requested from the initial issues raised. If more work is required, let me know or feel free to update this PR.The reason for these additions is to allow for more architectural flexibility when using MediatR (which also solves my initial issue). For more information, please refer to the linked issue.
TL;DR: I can have one project depend on the
MediatR.Pipeline
NuGet package to store implementations of handlers and behaviors without being allowed to use services to send nested requests, and I can have another project depending on theMediatR.Services
NuGet package for sending requests without implementing handlers.