开发者

Why does SvcUtil create a Channel interface that derives from IClientChannel

When you create code from a WSDL file using SvcUtil.exe, among the many types created 开发者_Python百科is an interface that derives from both the service interface and IClientChannel.

If, for example, the created service interface is called IMyService, it also creates this interface:

public interface IMyServiceChannel : 
    IMyService, System.ServiceModel.IClientChannel

Why does it define this interface? As far as I can see, it's not referenced from anywhere in the auto-generated code.


[UPDATE]

Found a link on MSDN (scroll to the very bottom). Nothing implements it, but you can use it when using ChannelFactory directly.

It's there so that users can have intelisense for both your service interface and WCF infrastructure in one place.

I remember someone from MS talking about it on a podcast or some blog...


Have you tried wsdl.exe? "svcutil /?" will show you the supported values for /tcv (target clr version).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜