diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs index ad8ece1c3..adb26d87e 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs @@ -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}{{"); diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs index 96b8e7c4b..fd7cdd5bb 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs @@ -80,7 +80,7 @@ namespace SerializableMigration var propertyCount = $"{propertyVarPrefix}Count"; source.AppendLine($"{indent}{ruleArguments[0]} {propertyEntry};"); - source.AppendLine($"{indent}var {propertyCount} = reader.ReadEncodedInt();"); + source.AppendLine($"{indent}var {propertyCount} = reader.ReadInt();"); source.AppendLine($"{indent}{property.Name} = new System.Collections.Generic.HashSet<{ruleArguments[0]}>({propertyCount});"); source.AppendLine($"{indent}for (var {propertyIndex} = 0; i < {propertyCount}; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); @@ -116,7 +116,7 @@ namespace SerializableMigration var propertyName = property.Name; var propertyVarPrefix = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}"; var propertyEntry = $"{propertyVarPrefix}Entry"; - source.AppendLine($"{indent}writer.WriteEncodedInt({property.Name}.Count);"); + source.AppendLine($"{indent}writer.Write({property.Name}.Count);"); source.AppendLine($"{indent}foreach (var {propertyEntry} in {property.Name});"); source.AppendLine($"{indent}{{"); diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs index 5ae28f411..f5af6001b 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs @@ -80,7 +80,7 @@ namespace SerializableMigration var propertyCount = $"{propertyVarPrefix}Count"; source.AppendLine($"{indent}{ruleArguments[0]} {propertyEntry};"); - source.AppendLine($"{indent}var {propertyCount} = reader.ReadEncodedInt();"); + source.AppendLine($"{indent}var {propertyCount} = reader.ReadInt();"); source.AppendLine($"{indent}{propertyName} = new System.Collections.Generic.List<{ruleArguments[0]}>({propertyCount});"); source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {propertyCount}; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); @@ -115,7 +115,7 @@ namespace SerializableMigration var propertyName = property.Name; var propertyEntry = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}Entry"; - source.AppendLine($"{indent}writer.WriteEncodedInt({propertyName}.Count);"); + source.AppendLine($"{indent}writer.Write({propertyName}.Count);"); source.AppendLine($"{indent}foreach (var {propertyEntry} in {propertyName})"); source.AppendLine($"{indent}{{");