Skip to content

Commit ca560c0

Browse files
author
sripp
committed
Serialize and Deserialize needs Version infos
1 parent cea2c0c commit ca560c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

TiaCodegen/CodeGen/KopCodeHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,10 @@ private void AddContactDefinitions(Network network, CodeBlock block)
291291
{
292292
var fc = (FunctionCall)op;
293293

294-
_sb.AppendLine("<Part Name=\"" + fc.FunctionName + "\" UId=\"" + op.OperationId + "\"" + (fc.DisableEno ? " DisabledENO=\"true\"" : "") + ">");
294+
if (fc.FunctionName == "Serialize" || fc.FunctionName == "Deserialize")
295+
_sb.AppendLine("<Part Name=\"" + fc.FunctionName + "\" Version=\"2.0\" UId=\"" + op.OperationId + "\"" + (fc.DisableEno ? " DisabledENO=\"true\"" : "") + ">");
296+
else
297+
_sb.AppendLine("<Part Name=\"" + fc.FunctionName + "\" UId=\"" + op.OperationId + "\"" + (fc.DisableEno ? " DisabledENO=\"true\"" : "") + ">");
295298
if (fc.AdditionalInnerXml != null)
296299
_sb.AppendLine(fc.AdditionalInnerXml);
297300

0 commit comments

Comments
 (0)