This is pretty simple with StructureMap, and even if you need to do some testing, this should work:
ObjectFactory.Configure(
x =>
{
x.For<GetFilesService.Service1Client>().HybridHttpOrThreadLocalScoped().Use(ctx =>
{
return new GetFilesService.Service1Client("NetTcpBinding_IService1", "net.tcp://localhost:8089/test");
});
}
);
(HybridHttpOrThreadLocalScoped)
Resolve:
var client = ObjectFactory.GetInstance<GetFilesService.Service1Client>();