You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error can be observed in the build output.
error CS0246: The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?)
The general idea here is that MyHandler<T> would be registered in the IoC container as an unbound generic typeof(MyHandler<>).
This would be preferable as it would reduce boilerplate code, i.e. a separate handler for each event type that delegates to the same underlying handler type at the end.
The text was updated successfully, but these errors were encountered:
@calledude Is it possible to use the base message type as the first parameter in the HandleAsync method? Then through type mapping we can figure out how to process the message. The same would have to be done when supporting generalizations. Perhaps it will help?
Given a structure that looks something like this
There is currently no way of handling these two "event types" under the same handler with generics.
In other words, this is illegal
The following error can be observed in the build output.
The general idea here is that
MyHandler<T>
would be registered in the IoC container as an unbound generictypeof(MyHandler<>)
.This would be preferable as it would reduce boilerplate code, i.e. a separate handler for each event type that delegates to the same underlying handler type at the end.
The text was updated successfully, but these errors were encountered: