Skip to content

Commit

Permalink
nino v2.0.7
Browse files Browse the repository at this point in the history
Nino.Serialization v2.0.7
- [Fix] Fix compilation error for cross project types
  • Loading branch information
JasonXuDeveloper committed Sep 16, 2024
1 parent 4eb8473 commit fcf8f83
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
Binary file modified Nino.unitypackage
Binary file not shown.
Binary file modified Nino_Unity/Assets/Test/Nino/Nino.Core.dll
Binary file not shown.
Binary file modified Nino_Unity/Assets/Test/Nino/Nino.Generator.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Nino.Core/Nino.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<LangVersion>9</LangVersion>
<PackageId>Nino.Serialization</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.0.6</Version>
<Version>2.0.7</Version>
<Title>Nino.Serialization</Title>
<Authors>JasonXuDeveloper</Authors>
<Description>High performance and low size binary serialization solution, especially for Unity.</Description>
<Copyright>JasonXuDeveloper</Copyright>
<RepositoryUrl>https://github.com/JasonXuDeveloper/Nino</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Nino;Serialization;Binary</PackageTags>
<PackageReleaseNotes>Nino.Serialization v2.0.6
- [Fix] Fix complilation error for cross project types</PackageReleaseNotes>
<PackageReleaseNotes>Nino.Serialization v2.0.7
- [Fix] Fix compilation error for cross project types</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://nino.xgamedev.net/</PackageProjectUrl>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Nino.Generator/DeserializerGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ void WriteMembers(List<MemberDeclarationSyntax> members, string valName)
throw new Exception("declaredType is null");

if (memberDeclarationSyntax is FieldDeclarationSyntax)
sb.AppendLine($" Deserialize(out {valName}.{name}, ref reader);");
sb.AppendLine($" {declaredType.GetDeserializePrefix()}(out {valName}.{name}, ref reader);");
else
{
var t = declaredType.ToDisplayString().Select(c => char.IsLetterOrDigit(c) ? c : '_')
.Aggregate("", (a, b) => a + b);
var tempName = $"{t}_temp_{name}";
sb.AppendLine(
$" Deserialize(out {declaredType.ToDisplayString()} {tempName}, ref reader);");
$" {declaredType.GetDeserializePrefix()}(out {declaredType.ToDisplayString()} {tempName}, ref reader);");
sb.AppendLine($" {valName}.{name} = {tempName};");
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Nino.Generator/Nino.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
<RootNamespace>Nino.Generator</RootNamespace>
<PackageId>Nino.Generator</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.0.6</Version>
<Version>2.0.7</Version>
<Title>Nino.Generator</Title>
<Authors>JasonXuDeveloper</Authors>
<Description>Source Generator for the high performance and low size binary serialization solution, especially for Unity.</Description>
<Copyright>JasonXuDeveloper</Copyright>
<RepositoryUrl>https://github.com/JasonXuDeveloper/Nino</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Nino;Serialization;Binary;Generator</PackageTags>
<PackageReleaseNotes>Nino.Serialization v2.0.6
- [Fix] Fix complilation error for cross project types</PackageReleaseNotes>
<PackageReleaseNotes>Nino.Serialization v2.0.7
- [Fix] Fix compilation error for cross project types</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AnalyzerLanguage>cs</AnalyzerLanguage>
<IncludeBuildOutput>false</IncludeBuildOutput>
Expand Down
3 changes: 2 additions & 1 deletion src/Nino.Generator/SerializerGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ void WriteMembers(List<MemberDeclarationSyntax> members, string valName)
if (declaredType == null)
throw new Exception("declaredType is null");

sb.AppendLine($" {valName}.{name}.Serialize(ref writer);");
sb.AppendLine(
$" {declaredType.GetSerializePrefix()}({valName}.{name}, ref writer);");
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Nino/Nino.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<IncludeContentInPack>true</IncludeContentInPack>
<PackageId>Nino</PackageId>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.0.6</Version>
<Version>2.0.7</Version>
<Title>Nino</Title>
<Authors>JasonXuDeveloper</Authors>
<Description>High performance and low size binary serialization solution, especially for Unity.</Description>
<Copyright>JasonXuDeveloper</Copyright>
<RepositoryUrl>https://github.com/JasonXuDeveloper/Nino</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Nino;Serialization;Binary</PackageTags>
<PackageReleaseNotes>Nino.Serialization v2.0.6
- [Fix] Fix complilation error for cross project types</PackageReleaseNotes>
<PackageReleaseNotes>Nino.Serialization v2.0.7
- [Fix] Fix compilation error for cross project types</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://nino.xgamedev.net/</PackageProjectUrl>
</PropertyGroup>
Expand Down

0 comments on commit fcf8f83

Please sign in to comment.