-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Enhancement 🔨Improvement of existing featuresImprovement of existing features
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
Enhancement 🔨Improvement of existing featuresImprovement of existing features