public Program() { Configure(); ServiceCollection = new ServiceCollection(); ConfigureServices(ServiceCollection); ServiceProvider serviceProvider = ServiceCollection.BuildServiceProvider(); Logger = serviceProvider.GetService <ILoggerFactory>().CreateLogger <Program>(); LabelImagesOptions labelImages = serviceProvider.GetService <IOptions <LabelImagesOptions> >().Value; Logger.LogInformation("Configurações:"); Logger.LogInformation(labelImages.ToString()); if (!Directory.Exists(labelImages.Diretorio)) { Directory.CreateDirectory(labelImages.Diretorio); } if (!Directory.Exists(labelImages.Processados)) { Directory.CreateDirectory(labelImages.Processados); } LerDiretorio = serviceProvider.GetService <ILerDiretorio>(); }
public MoveArquivoProcessado(string path, LabelImagesOptions option, Exception exception) { _path = path; _exception = exception; _options = option; }
public MoveArquivoProcessado(string path, LabelImagesOptions option) : this(path, option, null) { }