DIC Factories: automatic resolution of parameters

PR for #873.