StrongInject. Compile Time Dependency Injection For C# (https://github.com/YairHalberstadt/stronginject), что скажете друзья? Выглядит вроде вкусно, может помочь решить многие проблемы еще на этапе компиляции. Или привнести новую борьбу с новой библиотекой. 🙃
- Compile time checked dependency injection. If the type you're resolving isn't registered you get an error at compile time, not runtime.
- Fast. There's no dictionary lookups, no runtime code generation. Just the fastest code it's possible to generate to resolve your type.
- Encourage best practices. You can't use the container as a service locator. You can't forget to dispose the resolved types.
- No reflection or runtime code generation. Instead StrongInject uses roslyn Source Generators, meaning it's fast, and works well on UWP/IOS too. This also means it's linker friendly - see https://devblogs.microsoft.com/dotnet/app-trimming-in-net-5/.
- Async support. StrongInject fully supports async initialization and disposal, a feature sorely lacking in many IOC containers.
#dotnet #csharp #stronginject #github #nuget
Post #371
766