27 lines
793 B
C#
27 lines
793 B
C#
using System;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
namespace PhotoRenamer
|
|
{
|
|
internal class Renamer
|
|
{
|
|
private readonly IConfigurationRoot _configuration;
|
|
private readonly ILogger<Renamer> _logger;
|
|
|
|
public Renamer(IConfigurationRoot configuration, ILoggerFactory loggerFactory)
|
|
{
|
|
_configuration = configuration;
|
|
_logger = loggerFactory.CreateLogger<Renamer>();
|
|
}
|
|
|
|
public int Run()
|
|
{
|
|
var sourcePath = _configuration["Source"];
|
|
var targetPath = _configuration["Target"];
|
|
_logger.LogInformation($"Source path {sourcePath}");
|
|
_logger.LogInformation($"Target path {targetPath}");
|
|
return 0;
|
|
}
|
|
}
|
|
} |