Concrete type restriction in IConsumerFactory

26 views
Skip to first unread message

Eric St-Georges

unread,
Aug 9, 2016, 5:26:18 PM8/9/16
to masstransit-discuss
Hello,

I have a question about the IConsumerFactory.

The interface is defined as :
public interface IConsumerFactory<out TConsumer> : IProbeSite where TConsumer : class

Is there a specific reason behind the class restriction? It looks like it would make sense to allow interfaces in order to make things more "Injectable".

Cheers,
EricSG

Dru Sellers

unread,
Aug 9, 2016, 5:38:39 PM8/9/16
to masstrans...@googlegroups.com
"The type argument must be a reference type; this applies also to any class, interface, delegate, or array type."


So, the class in this case just means reference type, interfaces are TOTALLY allowed. :)

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/4f5280c3-e2fc-460b-96fe-3f6ab98b7c15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric St-Georges

unread,
Aug 9, 2016, 6:15:02 PM8/9/16
to masstransit-discuss
Huh.. yeah... Disregard that, I just had something silly on my end, causing an error. I shouldn't post things when I'm about to leave the office.

Thanks!


On Tuesday, August 9, 2016 at 5:38:39 PM UTC-4, Dru wrote:
"The type argument must be a reference type; this applies also to any class, interface, delegate, or array type."


So, the class in this case just means reference type, interfaces are TOTALLY allowed. :)
On Tue, Aug 9, 2016 at 4:26 PM, Eric St-Georges <thev...@gmail.com> wrote:
Hello,

I have a question about the IConsumerFactory.

The interface is defined as :
public interface IConsumerFactory<out TConsumer> : IProbeSite where TConsumer : class

Is there a specific reason behind the class restriction? It looks like it would make sense to allow interfaces in order to make things more "Injectable".

Cheers,
EricSG

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.

Dru Sellers

unread,
Aug 9, 2016, 6:17:46 PM8/9/16
to masstrans...@googlegroups.com
:)





To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages