If I am writing up a class with more than 1 constructor parameter like:
class A{
public A(Dependency1 d1, Dependency2 d2, ...){}
}
I usually create a "argument holder"-type of class like:
class AArgs{
public Dependency1 d1 { get; private set; }
public Dependency2 d2 { get; private set; }
...
}
and then:
class A{
public A(AArgs args){}
}
Typically, using a DI-container I can configure the constructor for dependencies & resolve them & so there is minimum impact when the constructors need to change.
Is this considered an anti-pattern and/or any arguments against doing this?