Skip to content

Feature: Support for ServiceLifetimes in TypeRegistrars

Choose a tag to compare

@DarthPedro DarthPedro released this 07 Jun 02:11
· 86 commits to main since this release
  • Added ISupportLifetimes and ITypeRegistrar extension method WithLifetimes to incorporate strongly-typed registration extension methods.
  • Implemented ISupportLifetimes on DependencyInjectionTypeRegistrar and LamarTypeRegistrar.
  • Implemented LifetimeExtenion generic methods RegisterSingleton, RegisterScoped, and Register Transient to allows services to be added with different ServiceLifetimes.
  • Added ability to set default ServiceLifetime for containers that support lifetimes: DITypeRegistrar, LamarTypeRegistrar, and LightInject.
  • Added unit tests for new functions.