fix(codegen): Fixes list rules (#632)
This commit is contained in:
parent
8b0bdc7d62
commit
72d3966541
3 changed files with 6 additions and 6 deletions
|
|
@ -70,7 +70,7 @@ namespace SerializableMigration
|
|||
Array.Copy(ruleArguments, 2, arrayElementRuleArguments, 0, ruleArguments.Length - 2);
|
||||
|
||||
var propertyIndex = $"{property.Name}Index";
|
||||
source.AppendLine($"{indent}{property.Name} = new {ruleArguments[0]}[reader.ReadEncodedInt()];");
|
||||
source.AppendLine($"{indent}{property.Name} = new {ruleArguments[0]}[reader.ReadInt()];");
|
||||
source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {property.Name}.Length; {propertyIndex}++)");
|
||||
source.AppendLine($"{indent}{{");
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ namespace SerializableMigration
|
|||
Array.Copy(ruleArguments, 2, arrayElementRuleArguments, 0, ruleArguments.Length - 2);
|
||||
|
||||
var propertyIndex = $"{property.Name}Index";
|
||||
source.AppendLine($"{indent}writer.WriteEncodedInt({property.Name}.Length);");
|
||||
source.AppendLine($"{indent}writer.Write({property.Name}.Length);");
|
||||
source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {property.Name}.Length; {propertyIndex}++)");
|
||||
source.AppendLine($"{indent}{{");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue