Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.6.2" />

 FluentServiceConfigurator<TConfigurator>

public class FluentServiceConfigurator<TConfigurator> : BaseFluentConfigurator<TConfigurator> where TConfigurator : FluentServiceConfigurator<TConfigurator>
Represents the fluent service registration api.
using System; namespace Stashbox.Registration.Fluent { public class FluentServiceConfigurator<TConfigurator> : BaseFluentConfigurator<TConfigurator> where TConfigurator : FluentServiceConfigurator<TConfigurator> { internal FluentServiceConfigurator(Type serviceType, Type implementationType) : base(serviceType, implementationType) { } internal FluentServiceConfigurator(Type serviceType, Type implementationType, RegistrationContext registrationContext) : base(serviceType, implementationType, registrationContext) { } public TConfigurator WithName(object name) { base.Context.Name = name; return (TConfigurator)this; } public TConfigurator DefinesScope(object scopeName = null) { base.Context.DefinedScopeName = (scopeName ?? base.ImplementationType); return (TConfigurator)this; } } }