In our application we use a singleton for a web service and that singleton is used for all classes.
I thought this was really cool, but then I saw a developers code where they had to unregister an event in the event handler itself.
This made me think back to just creating the wcf service and not having to worry about unregistering event handlers. Also I thought that there might be a way that two classes could interfere with each other because they both listen to the same method’s event handler.
What are the pros and cons of using a wcf singleton? Does one way have better performance then the other?
I would suggest reading this: http://msdn.microsoft.com/en-us/magazine/cc163590.aspx
Its a pretty good article which explains the different type of WCF services available, including singleton.