How do I pass values to the constructor on my wcf service?

You’ll need to implement a combination of custom ServiceHostFactory, ServiceHost and IInstanceProvider. Given a service with this constructor signature: public MyService(IDependency dep) Here’s an example that can spin up MyService: public class MyServiceHostFactory : ServiceHostFactory { private readonly IDependency dep; public MyServiceHostFactory() { this.dep = new MyClass(); } protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) … Read more

What are the differences between Abstract Factory and Factory design patterns?

The Difference Between The Two The main difference between a “factory method” and an “abstract factory” is that the factory method is a method, and an abstract factory is an object. I think a lot of people get these two terms confused, and start using them interchangeably. I remember that I had a hard time … Read more