hadashiA / VContainer

The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.
https://vcontainer.hadashikick.jp
MIT License
1.89k stars 165 forks source link

Multiple Injection in override members when multiple uses [Inject] #501

Closed ooonush closed 1 year ago

ooonush commented 1 year ago

In addition to issue https://github.com/hadashiA/VContainer/issues/496

class BaseClass
{
    [Inject]
    public virtual void InjectPublic(int value)
    {
        // do...
    }
}

class SubClass : BaseClass
{
    [Inject] // If use the [Inject] attribute several times, the injection will also happen several times.
    public override void InjectPublic(int value)
    {
        // do...
    }
}