Fix interface marshaller codegen for dotnet7

This commit is contained in:
Wojtek Figat
2023-04-17 22:34:00 +02:00
parent 8c02dfbb3f
commit 024dd74ae1

View File

@@ -1979,8 +1979,7 @@ namespace Flax.Build.Bindings
// End // End
indent = indent.Substring(0, indent.Length - 4); indent = indent.Substring(0, indent.Length - 4);
contents.AppendLine(indent + "}"); contents.AppendLine(indent + "}");
if (!string.IsNullOrEmpty(interfaceInfo.Namespace))
contents.AppendLine("}");
#if USE_NETCORE #if USE_NETCORE
{ {
string marshallerName = interfaceInfo.Name + "Marshaller"; string marshallerName = interfaceInfo.Name + "Marshaller";
@@ -1998,6 +1997,9 @@ namespace Flax.Build.Bindings
contents.Append(indent).AppendLine("}"); contents.Append(indent).AppendLine("}");
} }
#endif #endif
if (!string.IsNullOrEmpty(interfaceInfo.Namespace))
contents.AppendLine("}");
} }
private static bool GenerateCSharpType(BuildData buildData, StringBuilder contents, string indent, object type) private static bool GenerateCSharpType(BuildData buildData, StringBuilder contents, string indent, object type)