Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-8687yhbz5 fixing issue with config #118

Merged
merged 2 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Core/Resgrid.Config/ConfigProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
if (String.IsNullOrWhiteSpace(path))
{
path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase).Replace("file:\\", "");

Check warning on line 17 in Core/Resgrid.Config/ConfigProcessor.cs

View workflow job for this annotation

GitHub Actions / build

'Assembly.CodeBase' is obsolete: 'Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location.' (https://aka.ms/dotnet-warnings/SYSLIB0012)
path = $"{path}\\ResgridConfig.json";
}

Expand Down Expand Up @@ -64,7 +64,7 @@
return true;
}
}
catch (Exception ex)

Check warning on line 67 in Core/Resgrid.Config/ConfigProcessor.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'ex' is declared but never used
{
return false;
}
Expand All @@ -78,9 +78,9 @@

bool hasSetAtLeastOneVariable = false;

try
foreach (var configValue in values)
{
foreach (var configValue in values)
try
{
if (!String.IsNullOrWhiteSpace(configValue.Value) && configValue.Key.StartsWith("RESGRID"))
{
Expand Down Expand Up @@ -120,14 +120,14 @@
}
}
}

return hasSetAtLeastOneVariable;

}
catch (Exception ex)
{
return false;
catch (Exception ex)
{
Console.WriteLine($"Resgrid.Config: Error processing Environment Variable: {configValue.Key}");
Console.WriteLine(ex.ToString());
}
}

return hasSetAtLeastOneVariable;
}
}
}
114 changes: 0 additions & 114 deletions Core/Resgrid.Config/ResgridConfig.json

This file was deleted.

Loading