Filip-Drabinski / Godot.DependencyInjection

Godot.DependencyInjection
MIT License
53 stars 6 forks source link

Inject attribute unusable private method #10

Closed longZam closed 1 year ago

longZam commented 1 year ago

I'm sorry I'm not good at English.

I want to hide the inject method from the outside. Can you support inject for private methods? The Inject attribute does not work in code like the following:

public partial class Dependent : Node
{
    [Inject]
    private void Constructor(ISomeService service)
    {
        service.Foo();
    }
}
Filip-Drabinski commented 1 year ago

Thanks for creating issue. I have resolved it in #21. Sorry for not accepting your pull request. I made some updates that would have made it incompatible with the current codebase.