Skip to content

Split mediator into two packages: abstractions & full implementation#37

Merged
hasanxdev merged 2 commits intomainfrom
hsn/feat/abtraction-package
Aug 24, 2025
Merged

Split mediator into two packages: abstractions & full implementation#37
hasanxdev merged 2 commits intomainfrom
hsn/feat/abtraction-package

Conversation

@hasanxdev
Copy link
Owner

@hasanxdev hasanxdev commented Aug 24, 2025

This Pull Request adds an icon to DispatchR and addresses the request raised in Issue #17 by introducing a separation of concerns in the Mediator package structure:

  • DispatchR.Mediator.Abstractions: Contains only the core contracts and types (IRequest, INotification, IStreamRequest)
  • DispatchR.Mediator: Contains the complete mediator implementation

Motivation:
This allows consumers to reference only the abstractions when needed; for example, defining request/notification types in a shared class library that both frontend and backend projects can consume.
The frontend can depend solely on the lightweight abstractions without pulling in the full mediator logic, while the backend can leverage the complete implementation.

Changes:

  • Extracted interfaces and base contracts into a new DispatchR.Mediator.Abstractions package
  • Updated project structure and references accordingly
  • Adjusted namespaces and documentation to reflect the split

Benefits:

  • Reduces unnecessary dependencies in projects that only require the contracts
  • Improves modularity and flexibility in multi‑tier architectures
  • Makes it easier to share request/notification models across services and clients

Breck Changes:
Change the namespaces of the following interfaces:

  • INotification
  • INotificationHandler
  • IPipelineBehavior
  • IRequest
  • IRequestHandler
  • IStreamPipelineBehavior
  • IStreamRequest
  • IStreamRequestHandler
  • IMediator

@codecov
Copy link

codecov bot commented Aug 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hasanxdev hasanxdev force-pushed the hsn/feat/abtraction-package branch from b1de915 to f545036 Compare August 24, 2025 10:21
@hasanxdev hasanxdev merged commit ab0b4a7 into main Aug 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant