Hi,
According to msdn,the definition of ChannelFactory<t> is :
public class ChannelFactory<TChannel> : ChannelFactory, IChannelFactory<TChannel>, IChannelFactory, ICommunicationObject,
TChannel The type of channel produced by the channel factory. This type must be either IOutputChannel or IRequestChannel.
Here the TChannel is either IOutputChannel or IRequestChannel because of the channel shape. ok, no problem.
If I create a service contract like:
ISampleServiceChannel, and on the client side, we create the service proxy as below:
ISampleServiceChannel wcfClientChannel = factory.CreateChannel();
But as I set the breakpoint here, and use
(wcfClientChannel as IOutputChannel) or (wcfClientChannel as IRequestChannel), both are null.
what is the problem here? and how can I know the channel shape of user defined service contract ?
I know we can craete the custom channel which inherits the shaped channel (IOutputChannel or IRequestChannel).