Throw Exception if Missing Splat Registrations
Using Splat for Dependency Injection, I'm noticing that if a class is initialized and there are missing registrations, it will pass null to the constructor and I won't know about it. Is there a way to make it "fail early" and tell me there's a missing registration to build the object?
How are you doing your splat registrations?
May be worth using the new source generator package https://www.nuget.org/packages/Splat.DependencyInjection.SourceGenerator/
With Source Generator, actually.
This is a registration that caused me trouble because of a dependency that wasn't registered, was null, and would just throw a random error at runtime.
SplatRegistrations.RegisterLazySingleton<IAppPathService, AppPathService>();