WriteNginxFileSystem

This commit is contained in:
2025-04-29 15:12:17 -07:00
parent d23f802cdb
commit 8f22f188a2
6 changed files with 117 additions and 5 deletions

View File

@ -113,13 +113,14 @@ internal static partial class Helper20250219 {
List<string> columns = [];
JsonProperty jsonPropertyOld;
JsonProperty jsonPropertyNew;
List<string> columnPairs = [];
JsonProperty[] jsonPropertiesOld;
JsonProperty[] jsonPropertiesNew;
List<string> unknownColumns = [];
List<string> differentColumns = [];
int last = jsonElementsOld.Length - 1;
List<string> sameAfterSpaceSplitColumns = [];
for (int i = last; i > 0; i--) {
for (int i = last; i > -1; i--) {
if (jsonElementsOld[i].ValueKind != JsonValueKind.Object) {
unknownColumns.Add(string.Empty);
break;
@ -144,19 +145,23 @@ internal static partial class Helper20250219 {
if (processDataStandardFormatMapping.IgnoreColumns.Contains(jsonPropertyOld.Name)) {
if (i == last) {
columns.Add("-1");
columnPairs.Add($"{jsonPropertyOld.Name}:");
logger.LogDebug("{p} )) {jsonPropertyOld.Name} **", p, jsonPropertyOld.Name);
}
continue;
}
if (i == last) {
columns.Add("-1");
columnPairs.Add($"{jsonPropertyOld.Name}:");
if (!string.IsNullOrEmpty(valueOld))
logger.LogDebug("{p} )) {jsonPropertyOld.Name} ??", p, jsonPropertyOld.Name);
}
} else {
if (i == last)
columns.Add(q.Value.ToString());
jsonPropertyNew = jsonPropertiesNew[q.Value];
if (i == last) {
columns.Add(q.Value.ToString());
columnPairs.Add($"{jsonPropertyOld.Name}:{jsonPropertyNew.Name}");
}
valueNew = jsonPropertyNew.Value.ToString();
if (i == last)
logger.LogDebug("{p} )) {jsonPropertyOld.Name} ~~ {q.Value} => {jsonPropertyNew.Name}", p, jsonPropertyOld.Name, q.Value, jsonPropertyNew.Name);
@ -174,8 +179,10 @@ internal static partial class Helper20250219 {
}
}
}
if (i == last)
if (i == last) {
logger.LogInformation(string.Join(',', columns));
logger.LogInformation($"{string.Join(';', columnPairs)};");
}
}
result = unknownColumns.Count == 0 && differentColumns.Count == 0 && sameAfterSpaceSplitColumns.Count == 0;
return result;