I'm trying to go as native .NET as possible with a project I'm working on but the reference project I'm migrating has some Simple Injector registrations. Here's a line I'm stuck on
container.Register<IValidator<Foo>, FooValidator>();
container.Register<IValidator<Bar>, BarValidator>();
container.RegisterConditional(
typeof(IValidator<>),
typeof(ValidateNothingDecorator<>),
LifeStyle.Singleton,
c => !c.Handled);
This is from the Simple Injector documentation and I'm wondering if there's an equivalent way to do this on the built in .NET 6 IServiceCollection?