reactiveui/splat

How to Use Splat.DI.SourceGenerator

mysteryx93 opened this issue · 7 comments

Avalonia comes with ReactiveUI and ReactiveUI comes with Splat. I'm trying to use those default tools.

What bugs me off is that Splat by default needs to manually create each object. Splat.DI.SourceGenerator is supposed to solve that problem.

Now in my project I have Avalonia.ReactiveUI and Splat.DI.SourceGenerator

SplatRegistrations is not recognized. I find no way to use this.

SplatRegistrations.Register<IMenuUseCase, MenuUseCase>();
SplatRegistrations.Register<IOtherDependency, OtherDependency>();

I spent several hours trying to get this to work. What am I missing?

Besides the troubles to get this setup; what are the benefits of going the Splat route vs some more established DI containers like Microsoft DI or Simple Injector?

This is not the splat di source generator repo.

https://github.com/reactivemarbles/Splat.DI.SourceGenerator

GitHub
Contribute to reactivemarbles/Splat.DI.SourceGenerator development by creating an account on GitHub.

I would transfer the issue but it's in another organisation

When you do open the issue in the other repo can you include the ide you are using, your csproj file.

Thanks

It's a separate organization -- so this isn't even supported at all by Splat? Isn't the whole point of Dependency Injection to take care of the object initialization tree? Just trying to understand the logic here.

Marbles is the rxui incubation program. It's getting moved sooner rather than later into the main project.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.