Code generation for ClientBase <TChannel> and ChannelFactory <TChannel>?
I am studying the usage pattern used in ClientBase and ChannelFactory and there is one point at which I cannot lower my head.
In most examples, this usage
public class MyClient : ClientBase<IMySvcContract>, IMySvcContract {
// IMySvcContract Interface method
public string MyOperation(int param)
{
return this.Channel.MyOperation(param);
}
}
This is an example of a client calling a service method over a pipe. However, when I look closely, ClientBaseit has no implementation MyOperation(), it just knows about the public interfaces defined in IMySvcContract.
Therefore, when called this.Channel.MyOperation(), which block of code actually executes? Did he create code to implement TChannel at runtime? If so, how else can this template be achieved?
: 2 , ISvcContract, Client Server. - , , .
+4