From 154e2a64b3f87f0f3a0208538b2c27202a887f41 Mon Sep 17 00:00:00 2001 From: Giuliano Paschoalino Date: Tue, 30 Sep 2025 10:50:27 -0300 Subject: [PATCH] =?UTF-8?q?Atualiza=20depend=C3=AAncias=20e=20corrige=20bu?= =?UTF-8?q?gs=20em=20Program.cs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Atualização de dependências no arquivo `Pipefy.csproj`: - Bibliotecas do EntityFrameworkCore e outras foram atualizadas para a versão `9.0.9`. - `Newtonsoft.Json` foi atualizado para a versão `13.0.4`. Alterações no arquivo `Program.cs`: - Assinatura do método `Main` alterada para não aceitar argumentos. - Correção no cálculo do comprimento de `modalidade` com operador de coalescência nula para evitar exceções. - Ajuste na exibição do tempo restante, removendo chamada desnecessária ao método `ToString()`. --- Pipefy.csproj | 16 ++++++++-------- Program.cs | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Pipefy.csproj b/Pipefy.csproj index 41c67b4..b8eb3af 100644 --- a/Pipefy.csproj +++ b/Pipefy.csproj @@ -10,17 +10,17 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - + + + + + + diff --git a/Program.cs b/Program.cs index 188fc86..d83d412 100644 --- a/Program.cs +++ b/Program.cs @@ -16,7 +16,7 @@ class Program { endTime = date; } - static async Task Main(string[] args) + static async Task Main() { // Setup DI var serviceCollection = new ServiceCollection(); @@ -59,7 +59,7 @@ class Program await pipefyApi.CreateRecordsAsync(AppSettings.PIPEFY_TABLE_ID, recordsMissingInJson); int maxCId = recordsMissingInJson.OrderByDescending(s => s.c_digo_smart!.Length).First().c_digo_smart!.Length; int maxCNome = recordsMissingInJson.OrderByDescending(s => s.nome_da_empresa!.Length).First().nome_da_empresa!.Length; - int maxCMod = recordsMissingInJson.OrderByDescending(s => s.modalidade!.Length).First().modalidade!.Length; + int maxCMod = recordsMissingInJson.OrderByDescending(s => (s.modalidade ?? "").Length).First().modalidade!.Length; int maxCGestao = recordsMissingInJson.OrderByDescending(s => s.gestores!.Length).First().gestores!.Length; foreach (var record in recordsMissingInJson) { @@ -92,6 +92,6 @@ class Program } private static void OnTimerElapsed(object sender, ElapsedEventArgs e) { - Console.Write($"\rEncerrando em {endTime.Subtract(e.SignalTime).Seconds.ToString()}"); + Console.Write($"\rEncerrando em {endTime.Subtract(e.SignalTime).Seconds}"); } } \ No newline at end of file