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;
}
}
}