2525#define UNITY
2626#endif
2727
28- #if ! UNITY && ! SILVERLIGHT && ! NETSTANDARD1_1
28+ #if ! UNITY && ! SILVERLIGHT && ! NETSTANDARD1_1 && ! WINDOWS_PHONE && ! WINDOWS_UWP
2929#define FEATURE_EMIT
30- #endif // !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
30+ #endif // !UNITY && !SILVERLIGHT && !NETSTANDARD1_1 && !WINDOWS_PHONE && !WINDOWS_UWP
3131
3232using System ;
3333using System . IO ;
3434using System . Globalization ;
35- #if UNITY
35+ #if UNITY || WINDOWS_PHONE || WINDOWS_UWP
3636using System . Linq ;
3737using System . Reflection ;
38- #endif // UNITY
38+ #endif // UNITY || WINDOWS_PHONE || WINDOWS_UWP
3939using System . Runtime . Serialization ;
4040
4141using MsgPack . Serialization . DefaultSerializers ;
@@ -215,15 +215,15 @@ internal static MessagePackSerializer<T> CreateInternal<T>( SerializationContext
215215 Contract . Ensures ( Contract . Result < MessagePackSerializer < T > > ( ) != null ) ;
216216#endif // DEBUG
217217
218- #if DEBUG && ! UNITY && ! SILVERLIGHT && ! NETSTANDARD1_1
218+ #if DEBUG && ! UNITY && ! SILVERLIGHT && ! NETSTANDARD1_1 && ! WINDOWS_UWP
219219 SerializerDebugging . TraceEmitEvent (
220220 "SerializationContext::CreateInternal<{0}>(@{1}, {2})" ,
221221 typeof ( T ) ,
222222 context . GetHashCode ( ) ,
223223 schema == null ? "null" : schema . DebugString
224224 ) ;
225225
226- #endif // DEBUG && !UNITY && !SILVERLIGHT && !NETSTANDARD1_1
226+ #endif // DEBUG && !UNITY && !SILVERLIGHT && !NETSTANDARD1_1 && !WINDOWS_UWP
227227 Type concreteType = null ;
228228 CollectionTraits collectionTraits =
229229#if UNITY
@@ -360,7 +360,7 @@ public static MessagePackSerializer Create( Type targetType, SerializationContex
360360 Contract . Ensures ( Contract . Result < MessagePackSerializer > ( ) != null ) ;
361361#endif // DEBUG
362362
363- #if UNITY
363+ #if UNITY || WINDOWS_PHONE || WINDOWS_UWP
364364 return CreateInternal ( context , targetType , null ) ;
365365#else
366366 // MPS.Create should always return new instance, and creator delegate should be cached for performance.
@@ -411,7 +411,7 @@ public static MessagePackSerializer Create( Type targetType, SerializationContex
411411 ) ;
412412#endif // NETSTANDARD1_1 || NETSTANDARD1_3
413413 return factory ( context ) ;
414- #endif // UNITY
414+ #endif // UNITY || WINDOWS_PHONE || WINDOWS_UWP
415415 }
416416
417417 /// <summary>
@@ -538,7 +538,7 @@ public static MessagePackSerializer Get( Type targetType, SerializationContext c
538538 return context . GetSerializer ( targetType , providerParameter ) ;
539539 }
540540
541- #if UNITY
541+ #if UNITY || WINDOWS_PHONE || WINDOWS_UWP
542542 private static readonly System . Reflection . MethodInfo CreateInternal_2 =
543543 typeof ( MessagePackSerializer ) . GetRuntimeMethods ( )
544544 . Single ( m =>
@@ -562,7 +562,7 @@ internal static MessagePackSerializer CreateInternal( SerializationContext conte
562562 as Func < SerializationContext , PolymorphismSchema , object > ) ( context , schema ) as MessagePackSerializer ;
563563#endif // UNITY
564564 }
565- #endif // UNITY
565+ #endif // UNITY || WINDOWS_PHONE || WINDOWS_UWP
566566
567567 internal static MessagePackSerializer < T > CreateReflectionInternal < T > ( SerializationContext context , Type concreteType , PolymorphismSchema schema )
568568 {
0 commit comments