Skip to content

Commit

Permalink
Serialize and Deserialize needs Version infos
Browse files Browse the repository at this point in the history
  • Loading branch information
sripp committed Nov 13, 2024
1 parent cea2c0c commit ca560c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion TiaCodegen/CodeGen/KopCodeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,10 @@ private void AddContactDefinitions(Network network, CodeBlock block)
{
var fc = (FunctionCall)op;

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

Expand Down

0 comments on commit ca560c0

Please sign in to comment.