

ResolverOverride is an abstract base class and Unity comes with few of these built-in. Unity allows us to pass in a ResolverOverride when the container's Resolve -method is called. Unity creates an object of the specified. So now, after registration, we can use the Resolve() method. Learn about all the overloads of RegisterType on MSDN. The RegisterType method includes many overloads. Here, container.RegisterType() requests Unity to create an object of the BMW class and inject it through a constructor whenever you need to inject an object of ICar. So knowing that we need to pass in a string. One of them is ParameterOverride which lets you override a named parameter passed to a constructor. Home C# unity container resolve with parameter
