How do I inject constructor parameters in my dependencies that I configure using Prism?
I overrode RegisterTypes
to register my dependencies like this:
public partial class App : PrismApplication
{
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.Register<IMyService, MyService>();
}
}
However, MyService
has some constructor parameters that I need to be able to pass in. I want to be able to pass constructor parameters to MyService
, similar to how I would do it like this in Unity.
containerRegistry.Register<IMyService, MyService>(
new InjectionConstructor("param1", "param2"));