Compare commits
No commits in common. "e7372f2ae6747ed4f9d13707f769645148254776" and "90ec8dd3440978fe08942d1087b166c1c5d2ec7a" have entirely different histories.
e7372f2ae6
...
90ec8dd344
4 changed files with 4 additions and 33 deletions
|
@ -14,16 +14,6 @@ namespace Integracion_DGA
|
|||
{
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
IConfiguration configuration;
|
||||
|
||||
configuration = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.AddEnvironmentVariables()
|
||||
.Build();
|
||||
|
||||
FileLoggerHelper.ConfigureLogger(configuration);
|
||||
|
||||
try
|
||||
{
|
||||
Console.Write("Obteniendo variables de entorno...");
|
||||
|
@ -45,7 +35,9 @@ namespace Integracion_DGA
|
|||
using IHost host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureServices((context, services) =>
|
||||
{
|
||||
IConfiguration configuration = context.Configuration;
|
||||
services.AddSingleton<IConfiguration>(configuration);
|
||||
|
||||
services.AddScoped<MedicionScadaRepository>();
|
||||
services.AddScoped<EnvioDGA>();
|
||||
services.AddHttpClient<RegistrarMedicion>();
|
||||
|
|
|
@ -14,16 +14,6 @@ namespace Recuperacion_DGA
|
|||
{
|
||||
static async Task Main(string[] args)
|
||||
{
|
||||
IConfiguration configuration;
|
||||
|
||||
configuration = new ConfigurationBuilder()
|
||||
.SetBasePath(Directory.GetCurrentDirectory())
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.AddEnvironmentVariables()
|
||||
.Build();
|
||||
|
||||
FileLoggerHelper.ConfigureLogger(configuration);
|
||||
|
||||
try
|
||||
{
|
||||
Console.WriteLine("Obteniendo variables de entorno...");
|
||||
|
@ -45,7 +35,9 @@ namespace Recuperacion_DGA
|
|||
using IHost host = Host.CreateDefaultBuilder(args)
|
||||
.ConfigureServices((context, services) =>
|
||||
{
|
||||
IConfiguration configuration = context.Configuration;
|
||||
services.AddSingleton<IConfiguration>(configuration);
|
||||
|
||||
services.AddScoped<MedicionScadaRepository>();
|
||||
services.AddScoped<EnvioDGA>();
|
||||
services.AddHttpClient<RegistrarMedicion>();
|
||||
|
|
|
@ -20,10 +20,4 @@
|
|||
<ProjectReference Include="..\SHARED\Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogFile": {
|
||||
"Path": "logs/log.txt"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue