Should i share pipe proxy instance?
I have one proxy endpoint net.pipe://localhost/PipeConsole and one communication interface. I have two pieces in program that want to use this interface in different way (call different subset of methods, may intercept) Should each of them create pipe proxy instance or I should share it? What if two threads will try to access same pipe proxy method at the same time?
ChannelFactory<IManagementConsole> pipeFactory = new ChannelFactory<IManagementConsole>( new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/PipeConsole"));
ChannelFactory instances are thread safe, so you should be good, i myself share same instance of proxy between multiple threads, and it works fine.