Skip to content

Simple Injector v4.7

Compare
Choose a tag to compare
@dotnetjunkie dotnetjunkie released this 01 Sep 19:14
· 10 commits to v4.7.x since this release

Release Notes

Simple Injector can be downloaded using NuGet.

The most prominent improvements in this release are:

  • #649 Implemented C# 8.0 non-nullable support. This affects the core library and all integration packages. The complete API is now annotated in such way that C# 8 can warn you want you are possible using a null reference.
  • Simplify integration with IStringLocalizer and IStringLocalizer<T> while integrating with .NET Core. Thanks to contributor @kwlin for implementing this.

Improvements

Simple Injector core library

  • #649 Implemented C# 8 non-nullable support
  • #736 Marked [Obsolete] message as error
  • #727 Added GetService method to Scope by implementing IServiceProvider.
    Usage:
    Scope scope = ...;
    IServiceProvider provider = scope;
    object? service = provider.GetService(typeof(SomeType));

ASP.NET Core Integration packages

  • #717 Added non-generic options.UseMiddleware overload.

ServiceCollection Integration packages

  • #718 Simplify integration with IStringLocalizer and IStringLocalizer<T> by adding an UseLocalization() extension method. Implemented by @kwlin.
    Usage:

    app.UseSimpleInjector(container, options =>
    {
        options.UseLocalization();
    });