Skip to content

Commit ce00264

Browse files
committed
Fix path of MessagePackSerializer.Create() in Xamarin.
1 parent 9181f03 commit ce00264

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/MsgPack/Serialization/MessagePackSerializer.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ public static IMessagePackSingleObjectSerializer Create( Type targetType, Serial
368368
#endif // !UNITY
369369

370370
#if XAMIOS || XAMDROID || UNITY
371-
return CreateReflectionInternal( context, targetType );
371+
return CreateInternal( context, targetType, null );
372372
#else
373373
// MPS.Create should always return new instance, and creator delegate should be cached for performance.
374374
#if NETFX_CORE
@@ -561,29 +561,29 @@ public static IMessagePackSingleObjectSerializer Get(
561561
}
562562

563563
#if XAMIOS || XAMDROID || UNITY
564-
private static readonly System.Reflection.MethodInfo CreateReflectionInternal_1 =
564+
private static readonly System.Reflection.MethodInfo CreateInternal_2 =
565565
typeof( MessagePackSerializer ).GetMethod(
566-
"CreateReflectionInternal",
566+
"CreateInternal",
567567
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic,
568568
null,
569-
new []{ typeof( SerializationContext ) },
569+
new []{ typeof( SerializationContext ), typeof( PolymorphismSchema ) },
570570
null
571571
);
572572

573-
internal static IMessagePackSingleObjectSerializer CreateReflectionInternal( SerializationContext context, Type targetType )
573+
internal static IMessagePackSingleObjectSerializer CreateInternal( SerializationContext context, Type targetType, PolymorphismSchema schema )
574574
{
575575
#if UNITY_ANDROID || UNITY
576576
return
577577
(
578578
Delegate.CreateDelegate(
579-
typeof( Func<SerializationContext, object> ),
580-
CreateReflectionInternal_1.MakeGenericMethod( targetType )
579+
typeof( Func<SerializationContext, PolymorphismSchema, object> ),
580+
CreateInternal_2.MakeGenericMethod( targetType )
581581
)
582-
as Func<SerializationContext, object> )( context ) as IMessagePackSingleObjectSerializer;
582+
as Func<SerializationContext, PolymorphismSchema, object> )( context, schema ) as IMessagePackSingleObjectSerializer;
583583
#else
584584
return
585-
( CreateReflectionInternal_1.MakeGenericMethod( targetType ).CreateDelegate( typeof( Func<SerializationContext,object> ) )
586-
as Func<SerializationContext, object> )( context ) as IMessagePackSingleObjectSerializer;
585+
( CreateInternal_2.MakeGenericMethod( targetType ).CreateDelegate( typeof( Func<SerializationContext, PolymorphismSchema, object> ) )
586+
as Func<SerializationContext, PolymorphismSchema, object> )( context, schema ) as IMessagePackSingleObjectSerializer;
587587
#endif
588588
}
589589
#endif // XAMIOS || XAMDROID || UNITY

0 commit comments

Comments
 (0)