Skip to content

Instantly share code, notes, and snippets.

@Kritner
Last active December 13, 2016 13:26
Show Gist options
  • Save Kritner/cae0785caa1fc59ec773acd8d2a2222b to your computer and use it in GitHub Desktop.
Save Kritner/cae0785caa1fc59ec773acd8d2a2222b to your computer and use it in GitHub Desktop.
Many constructor parameters or a wrapper class for constructor parameters?
public class Foo
{
public Foo(IService1 service1, IService2 service2, IService3 service3, IService4 service4, IService5 service5)
{
// ...
}
}
public class Foo
{
public Foo(IServiceService service)
{
}
}
public interface IServiceService
{
IService1 Service1 {get;}
IService2 Service2 {get;}
IService3 Service3 {get;}
IService4 Service4 {get;}
IService5 Service5 {get;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment