The user should be able to pass a parameter to the constructor of the registered class from the IIocInstaller. This has to be possible within the fluent registration of the type (similar to OnCreate()).
Initial idea:
Add a function Parameters(params object[] parameters) to IDefaultRegistration<> and pass the given arguments to the ResolveInternal<>() or the CreateInstance<>() method when the type is resolved.
Problem:
If multiple parameters of the same type are passed through different ways (passed directly to Resolve<>() or new Parameters() method), how does the container know when to use which parameter?
The user should be able to pass a parameter to the constructor of the registered class from the
IIocInstaller
. This has to be possible within the fluent registration of the type (similar toOnCreate()
).Initial idea:
Add a function
Parameters(params object[] parameters)
toIDefaultRegistration<>
and pass the given arguments to theResolveInternal<>()
or theCreateInstance<>()
method when the type is resolved.Problem:
If multiple parameters of the same type are passed through different ways (passed directly to
Resolve<>()
or newParameters()
method), how does the container know when to use which parameter?