Concrete type restriction in IConsumerFactory

已查看 26 次
跳至第一个未读帖子

Eric St-Georges

未读,
2016年8月9日 17:26:182016/8/9
收件人 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

未读,
2016年8月9日 17:38:392016/8/9
收件人 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

未读,
2016年8月9日 18:15:022016/8/9
收件人 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

未读,
2016年8月9日 18:17:462016/8/9
收件人 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.
回复全部
回复作者
转发
0 个新帖子