4 Replies
// as i cannot use TEvent directly.why? Regardless, it seems you want to be calling a generic method from a non-generic base class. There is a pattern that can do this for you with a bit of casting. It's a bit ugly, but it lets you pass
IBase
around and call foo with a T
as long as you know its rightThanks for taking the time to read my post The pattern you showed works as expected but yea looks kinda ugly as i will need a Base class to wrap the casting... I would LOVE TEvent to be Resolved as MyEvent and not IEvent<MyAggregateIdentity>
Yup. or switch to cpp and wait for 'deducing this' 😅
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.