Skip to content

Add PublishObject method to support non-generic notifications#38

Merged
hasanxdev merged 1 commit intomainfrom
hsn/feat/publish-objects
Sep 20, 2025
Merged

Add PublishObject method to support non-generic notifications#38
hasanxdev merged 1 commit intomainfrom
hsn/feat/publish-objects

Conversation

@hasanxdev
Copy link
Owner

Summary

As requested in issue #33, this PR introduces a new overload for method Publish in DispatchR that allows publishing notifications without requiring a concrete generic type. Users can now pass an object directly, providing more flexibility for dynamic scenarios.

Changes

  • Added Publish(object request, CancellationToken cancellationToken) method.
  • Ensures backward compatibility with existing generic Publish<TNotification> methods and includes corresponding tests.

Benefits

  • Simplifies use cases where the notification type is not known at compile time.
  • Avoids forcing users to create concrete types for temporary or dynamic notifications.
  • Keeps DispatchR flexible and user-friendly.

@codecov
Copy link

codecov bot commented Sep 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hasanxdev hasanxdev merged commit 22b7d02 into main Sep 20, 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