There is a kind of rule in dependency injection literature, stating that we should declare all arguments in the constructor
Where? In which literature?
Given your examples, if _input is, in fact, run-time input, why don't you just write the class like the following?
public class Transformation
{
private readonly IConditionStrategy condition;
public Transformation(IConditionStrategy condition)
{
this.condition = condition;
}
public ISource Transform(ISource input)
{
ISource source = new Source();
foreach(var i in input)
if(input.Check(i))
source.Add(i);
return source;
}
}
public class Transformation
{
private readonly IConditionStrategy condition;
public Transformation(IConditionStrategy condition)
{
this.condition = condition;
}
public ISource Transform(ISource input)
{
ISource source = new Source();
foreach(var i in input)
if(input.Check(i))
source.Add(i);
return source;
}
}