I\'m very new to autofac so it\'s possible that I\'m completely misusing it.
Let\'s say I have a class that has this structure:
public class HelperClass
You can always use the WithParameter
method to explicitly specify a constructor parameter:
builder.RegisterType()
.As()
.WithParameter("helper", new HelperClass("do", "something"));
builder.RegisterType()
.As()
.WithParameter("helper", new HelperClass("do", "somethingelse"));
As far as I can tell there is no need for an interface for HelperClass
because it essentially is just a value holder.
For this to work you would need to make the internal constructor public, I think.