How does the svcutil (WCF) create task based methods for every service?

173 views Asked by At

I have a system with about 10 WCF services.

The services communicate between themselves using a ChannelFactory.

The ChannelFactory is used behind an interceptor.

Here's a sample of how the code looks:

var service = ServiceCreator.CreateService<IService1>(); // dynamic proxy
service.DoSomething(); // behind the scenes the call is intercepted and the WCF channel factory is called

My problem is that my interfaces have sync methods and I have a bottle neck on waiting for these sync service calls to finish - This blocks my threads and causes performance issues.

How does the svcutil create Task based methods for services? I would like to somehow do the same thing inside an interceptor and scale my application better.

0

There are 0 answers