[SwapEndianGenerator] Skip string types.

This commit is contained in:
2025-10-21 10:50:25 +01:00
parent 35123c6c06
commit 66ce90a155

View File

@@ -361,6 +361,9 @@ public class SwapEndianGenerator : IIncrementalGenerator
"byte" or "Byte" or "sbyte" or "SByte" =>
$" // {fieldName} - no swap needed for byte types",
"string" or "String" =>
$" // {fieldName} - no swap needed for string types",
"Guid" => $" // TODO: Implement GUID swap for {fieldName}",
@@ -423,6 +426,9 @@ public class SwapEndianGenerator : IIncrementalGenerator
"byte" or "System.Byte" or "sbyte" or "System.SByte" =>
$" // {fieldName} - no swap needed for byte types",
"string" or "System.String" =>
$" // {fieldName} - no swap needed for string types",
_ => null
};
@@ -608,4 +614,5 @@ public class SwapEndianGenerator : IIncrementalGenerator
return value;
}
""";
}
}