Example #1
0
        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>();
        }
Example #2
0
 public MoveArquivoProcessado(string path, LabelImagesOptions option, Exception exception)
 {
     _path      = path;
     _exception = exception;
     _options   = option;
 }
Example #3
0
 public MoveArquivoProcessado(string path, LabelImagesOptions option) : this(path, option, null)
 {
 }