Updated Jenkinsfile and .NET version.
This commit is contained in:
@@ -49,21 +49,21 @@ namespace DotNetResxUtils.Commands
|
||||
return result;
|
||||
}
|
||||
|
||||
private void FlattenJsonElement(IDictionary<string, string> flattened, JsonElement jsonElement, string namepath)
|
||||
private void FlattenJsonElement(IDictionary<string, string> flattened, JsonElement jsonElement, string namePath)
|
||||
{
|
||||
if (jsonElement.ValueKind == JsonValueKind.Array)
|
||||
{
|
||||
int itemIndex = 0;
|
||||
foreach (JsonElement item in jsonElement.EnumerateArray())
|
||||
{
|
||||
FlattenJsonElement(flattened, item, namepath + $"[{itemIndex}]");
|
||||
FlattenJsonElement(flattened, item, namePath + $"[{itemIndex}]");
|
||||
}
|
||||
}
|
||||
else if (jsonElement.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
foreach (JsonProperty item in jsonElement.EnumerateObject())
|
||||
{
|
||||
FlattenJsonElement(flattened, item.Value, namepath + $".{item.Name}");
|
||||
FlattenJsonElement(flattened, item.Value, namePath + $".{item.Name}");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -71,7 +71,7 @@ namespace DotNetResxUtils.Commands
|
||||
string? stored = jsonElement.GetString();
|
||||
if (stored != null)
|
||||
{
|
||||
flattened[namepath] = stored;
|
||||
flattened[namePath] = stored;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
Reference in New Issue
Block a user