Skip to content

Commit 2a43c0e

Browse files
committed
Fix failed to serialize type info in Xamdroid because it returns "neutral" instead of null for culture-neutral assemblies.
1 parent efe4188 commit 2a43c0e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/MsgPack/Serialization/Polymorphic/TypeInfoEncoder.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ public static void Encode( Packer packer, Type type )
6767
.Pack( compressedTypeName )
6868
.Pack( assemblyName.Name )
6969
.Pack( version )
70+
#if !XAMIOS && !XAMDROID
7071
.Pack( assemblyName.GetCultureName() )
72+
#else
73+
.Pack( assemblyName.GetCultureName() == "neutral" ? null : assemblyName.GetCultureName() )
74+
#endif // !XAMIOS && !XAMDROID
7175
.Pack( assemblyName.GetPublicKeyToken() );
7276
}
7377

0 commit comments

Comments
 (0)