public DockerHostedServiceDependencyContainerBuilder(ILogger sharedLogger, IDockerWorkQueue sharedDockerWorkQueue)
        {
            _sharedLogger          = sharedLogger;
            _sharedDockerWorkQueue = sharedDockerWorkQueue;

            _containerBuilder = new ContainerBuilder();
        }
        public Worker(IDockerHostedServiceDependencyContainerBuilder dependencyContainerBuilder)
        {
            dependencyContainerBuilder.AddServices();
            var dependencyContainer = dependencyContainerBuilder.BuildContainer();

            using var dependencyLifetimeScope = dependencyContainer.BeginLifetimeScope();

            _logger = dependencyLifetimeScope.Resolve <ILogger>();
            _createContainerHandlerFactory = dependencyLifetimeScope.Resolve <CreateContainerHandlerFactory>();
            _dockerWorkQueue = dependencyLifetimeScope.Resolve <IDockerWorkQueue>();
        }
 public FetchImageHandler(ILogger <FetchImageHandler> logger,
                          IMediator mediator,
                          IDockerWorkQueue dockerWorkQueue,
                          ApplicationDbContext dbContext,
                          IImageService imageService)
 {
     _logger          = logger;
     _mediator        = mediator;
     _dockerWorkQueue = dockerWorkQueue;
     _dbContext       = dbContext;
     _imageService    = imageService;
 }