class Program
{
static void Main()
{
var container = new SimpleInjector.Container();
container.Register<IDbService, DbService>();
container.RegisterSingleton<IEntityCacheService, EntityCacheService>();
container.Register<IAuthenticationImpl, AuthenticationImpl>();
container.Verify();
var instance = container.GetInstance<IAuthenticationImpl>();
Console.WriteLine(instance.GetType());
}
}
internal class AuthenticationImpl : IAuthenticationImpl
{
private IDbService dbService;
private IEntityCacheService entityCache;
public AuthenticationImpl(IDbService dbService, IEntityCacheService entityCache)
{
this.dbService = dbService;
this.entityCache = entityCache;
}
}
internal interface IAuthenticationImpl{}
internal class EntityCacheService : IEntityCacheService{}
internal interface IEntityCacheService{}
internal class DbService : IDbService{}
internal interface IDbService{}