A WCF Dynamic Client Proxy so you don't have to inherit from ClientBase all the time.
The proxy also has fault tolerance so you don't have to dispose of it if it has failed. You can simply reuse it and it will dispose of the failed channel and start a new one.
What do I get?
A runtime-generated ClientBase derived proxy that:
- You don't have to generate, or maintain in code
- Does not have to be disposed if the channel fails. You can simply reuse it immediately.
Why do you want to use the WCF Dynamic Client Proxy?
First of all
that you dispose of any client proxy if it's faulted.
You are not allowed to reuse the proxy which makes coding against WCF a bit of a pain if you have to check for faults and close/dispose of your proxy and recreate it after every error.
The WCFDynamicClientProxy solves this problem by offering you a proxy that does not have to be disposed.
Remember, this is just smoke-and-mirrors (nice smoke and cute mirrors). All the proxy does is create a ClientBase derived proxy under the hood that
get disposed for you in case of a fault and regenerated on the next request thus keeping your code nice and clean.
Secondly, maintaining ClientBase derived proxies is a bit of a pain. When you have the interface all you care is that you can call it. WCFDynamicClientProxy does exactly that. Removes the need for you to generate, code and maintain the proxy class. The class
gets code-emitted at runtime based on the interface.
IService1 service = WCFClientProxy<IService1>.GetReusableInstance("Service1");
For more details visit: