Would this functionality be easily doable or has it been ruled out in the past?
Currently we have IDispatcher.Dispatch(object), what are the chances we could get a variation method which requires some interface or base class/record, to allow for typesafety?
For example say i have:
Queries.GetFirstItem as a mediatr query
Actions.GetFirstItem as a Fluxor action
I can restrict sending improper messages through mediatr because they must all implement an interface, however by allowing the generic object parameter type it is very easy to send the wrong type through idispatcher
This is important because when handling effects you are restricted to the idispatcher functionality, since you cannot extend the idispatcher interface for the injected handler method
I have found two workarounds, either add an extension method, or write a custom wrapper method in each effect it is needed (or inherit)
Would this functionality be easily doable or has it been ruled out in the past?
Currently we have IDispatcher.Dispatch(object), what are the chances we could get a variation method which requires some interface or base class/record, to allow for typesafety?
For example say i have: Queries.GetFirstItem as a mediatr query Actions.GetFirstItem as a Fluxor action
I can restrict sending improper messages through mediatr because they must all implement an interface, however by allowing the generic object parameter type it is very easy to send the wrong type through idispatcher
This is important because when handling effects you are restricted to the idispatcher functionality, since you cannot extend the idispatcher interface for the injected handler method
I have found two workarounds, either add an extension method, or write a custom wrapper method in each effect it is needed (or inherit)
Thank you for all your effort on this project