Hi
I am new to IOC, so I wanted to know the best strategy to handle the case where I want to pass data structures/paramters as well as injected objects into a class, like
simple example:
public class EmailSender
{
public EmailSender(string ToEmail, string Subject,String body,
ILogger EmailLogger)
{.....}
}
What is the best strategy here? I guess the above is no possible to inject directly?
I guess I need to put all the string parameters as setters instead and just have the Ilogger in the constructor? or the other way around.
Or am I wrong?
//andy
PS, I know the example above sucks and ToEmail and Body should be passed in a separate method call, but it was just to make a example. I will see the other post as well.