I'm working with an application that uses WSTrustChannelFactory
to create trust channels, I noticed that the code is creating a new WSTrustChannelFactory
everytime a new channel is needed.
I've never worked with this before but since this is a factory I suppose it can be implemented as a singleton.
Am I right? If so, is there any additional consideration to take (will the factory always be "usable" or there are any scenarios/exceptions where it should be replaced with a new instance)?. Also, is the factory creation an expensive operation, such as a WCF ChannelFactory
creation?