From Contract to Channel

When you create a client channel through ServiceModel, the shape of the channel is determined by various properties of your contract. Roughly the mapping is as follows:

OneWay Request/Reply Session Callback Channel
Any Any No Yes IDuplexChannel
Any Any No Yes IDuplexSesionChannel
Any Any Yes Yes IDuplexSessionChannel
Yes Yes No No IDuplexChannel
Yes Yes No No IRequestChannel
Yes Yes No No IDuplexSessionChannel
Yes Yes Yes No IDuplexSessionChannel
Yes Yes Yes No IRequestSessionChannel
Yes No No No IOutputChannel
Yes No No No IDuplexChannel
Yes No No No IDuplexSessionChannel
Yes No No No IRequestChannel
Yes No Yes No IOutputSessionChannel
Yes No Yes No IDuplexSessionChannel
Yes No Yes No IRequestSessionChannel
No Yes No No IRequestChannel
No Yes No No IDuplexChannel
No Yes No No IDuplexSessionChannel
No Yes Yes No IRequestSessionChannel
No Yes Yes No IDuplexSessionChannel

ServiceModel also has internal adapters so that, for example, if your stack supports IOutputSessionChannel, then ServiceModel can adapt that channel to a desired IOutputChannel. More on this in a later post.

2 thoughts on “From Contract to Channel

  1. Pingback: Buddhike's Weblog

  2. Pingback: » Blog Archive » Adapting Channel Shapes

Leave a Reply

Your email address will not be published. Required fields are marked *