Description
DependencyOverride<T> does not implement a constructor that would take a name parameter.
Problem
The DependencyOverride<T> class declared with only one constructor that takes value of the override.
public class DependencyOverride<T> : DependencyOverride
{
public DependencyOverride(object dependencyValue)
: base(null, typeof(T), null, dependencyValue)
{
}
}
In case override should target a named dependency, a constructor with name argument is required.
Solution
Add additional constructors to cover missing functionality:
public DependencyOverride<T>(Type target, string name, object value)
: base(target, typeof(T), name, value)
{
}
public DependencyOverride<T>(string name, object value)
: base(null, typeof(T), name, value)
{
}
Impact
None.
Description
DependencyOverride<T>does not implement a constructor that would take anameparameter.Problem
The
DependencyOverride<T>class declared with only one constructor that takes value of the override.In case override should target a named dependency, a constructor with name argument is required.
Solution
Add additional constructors to cover missing functionality:
Impact
None.