Skip to content

h0gh/WCFUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

WCFUtils

These classes can be used for generating WCF clients using IoC.

The ChannelFactoryManager should be configured as a singleton, and the WCFServiceInvoker as transient. E.g. using Unity:

container.RegisterType<ChannelFactoryManager>(new ContainerControlledLifetimeManager());
container.RegisterType<WCFServiceInvoker>(new TransientLifetimeManager());

The invoker can then be injected into classes and used as follows:

int result = _invoker.InvokeService<ICalculatorService>(s => s.Add(2, 2));
Assert.Equal(4, result);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages