Senin, 16 April 2012

How do I implement a generic interface without a constraint to call a specific implementation of a generic function that does require a constraint?

Specifically, I am using MassTransit, but I want to abstract away the specific implementation, so I cannot have a reference to IConsumer (which is in the MassTransit namespace) in my interface, therefore cannot add it as a generic constraint. My implemented function in this case is "Subscribe", but I need to somehow call "Bus.SubscribeConsumer". Any ideas? public UnsubscribeAction Subscribe<

0 comments:

Posting Komentar