/// <summary>
        ///  Creates a new instance of the compiler service.
        /// </summary>
        /// <param name="logger">The logger for the service.</param>
        /// <param name="applicationLifetime">The application lifetime.</param>
        /// <param name="configuration">The application configuration.</param>
        /// <param name="publisher">The queue publisher used to sent messages into the queue.</param>
        public WorkerManagementService(ILogger <WorkerManagementService> logger, IHostApplicationLifetime applicationLifetime,
                                       IConfiguration configuration, CompilerPublisher publisher)
        {
            this._logger = logger;
            this._hostApplicationLifetime = applicationLifetime;
            this._publisher = publisher;


            this._configuration = configuration.GetSection("configuration").GetSection("compiler")
                                  .Get <CompileServiceConfiguration>();
        }
示例#2
0
        /// <summary>
        ///  Creates a new instance of the compiler service.
        /// </summary>
        /// <param name="logger">The logger for the service.</param>
        /// <param name="applicationLifetime">The application lifetime.</param>
        /// <param name="configuration">The application configuration.</param>
        /// <param name="publisher">The queue publisher used to sent messages into the queue.</param>
        public CompilerService(ILogger <CompilerService> logger, IHostApplicationLifetime applicationLifetime,
                               IConfiguration configuration, CompilerPublisher publisher)
        {
            this._logger = logger;
            this._hostApplicationLifetime = applicationLifetime;
            this._publisher = publisher;


            this._configuration = configuration.GetSection("configuration").GetSection("compiler")
                                  .Get <CompileServiceConfiguration>();

            this._dockerClient = new DockerClientConfiguration().CreateClient();
        }