Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.0.0-preview-715" />

 RegistrationConfigurator<TService, TImplementation>

public class RegistrationConfigurator<TService, TImplementation> : FluentServiceConfigurator<TService, TImplementation, RegistrationConfigurator<TService, TImplementation>>
Represents the generic fluent service registration api.
using System; namespace Stashbox.Registration.Fluent { public class RegistrationConfigurator<TService, TImplementation> : FluentServiceConfigurator<TService, TImplementation, RegistrationConfigurator<TService, TImplementation>> { internal RegistrationConfigurator(Type serviceType, Type implementationType) : base(serviceType, implementationType) { } public RegistrationConfigurator<TService, TImplementation> WithInstance(TService instance, bool wireUp = false) { base.Context.ExistingInstance = instance; base.Context.IsWireUp = wireUp; base.ImplementationType = instance.GetType(); return this; } } }