@@ -538,13 +538,23 @@ internal static bool IsSupported( Type type, CollectionTraits traits, bool prefe
538538 /// <summary>
539539 /// Defines non-generic factory method for built-in serializers which require generic type argument.
540540 /// </summary>
541- private interface IGenericBuiltInSerializerFactory
541+ #if SILVERLIGHT
542+ internal
543+ #else
544+ private
545+ #endif // SILVERLIGHT
546+ interface IGenericBuiltInSerializerFactory
542547 {
543548 MessagePackSerializer Create ( SerializationContext context , PolymorphismSchema schema ) ;
544549 }
545550
546551 [ Preserve ( AllMembers = true ) ]
547- private sealed class NullableInstanceFactory < T > : IGenericBuiltInSerializerFactory
552+ #if SILVERLIGHT
553+ internal
554+ #else
555+ private
556+ #endif // SILVERLIGHT
557+ sealed class NullableInstanceFactory < T > : IGenericBuiltInSerializerFactory
548558 where T : struct
549559 {
550560 public NullableInstanceFactory ( ) { }
@@ -556,7 +566,12 @@ public MessagePackSerializer Create( SerializationContext context, PolymorphismS
556566 }
557567
558568 [ Preserve ( AllMembers = true ) ]
559- private sealed class ListInstanceFactory < T > : IGenericBuiltInSerializerFactory
569+ #if SILVERLIGHT
570+ internal
571+ #else
572+ private
573+ #endif // SILVERLIGHT
574+ sealed class ListInstanceFactory < T > : IGenericBuiltInSerializerFactory
560575 {
561576 public ListInstanceFactory ( ) { }
562577
@@ -568,7 +583,12 @@ public MessagePackSerializer Create( SerializationContext context, PolymorphismS
568583 }
569584
570585 [ Preserve ( AllMembers = true ) ]
571- private sealed class DictionaryInstanceFactory < TKey , TValue > : IGenericBuiltInSerializerFactory
586+ #if SILVERLIGHT
587+ internal
588+ #else
589+ private
590+ #endif // SILVERLIGHT
591+ sealed class DictionaryInstanceFactory < TKey , TValue > : IGenericBuiltInSerializerFactory
572592 {
573593 public DictionaryInstanceFactory ( ) { }
574594
@@ -656,14 +676,24 @@ public MessagePackSerializer Create( SerializationContext context, PolymorphismS
656676 /// <summary>
657677 /// Defines non-generic factory method for 'universal' serializers which use general collection features.
658678 /// </summary>
659- private interface IVariantSerializerFactory
679+ #if SILVERLIGHT
680+ internal
681+ #else
682+ private
683+ #endif // SILVERLIGHT
684+ interface IVariantSerializerFactory
660685 {
661686 MessagePackSerializer Create ( SerializationContext context , Type targetType , PolymorphismSchema schema ) ;
662687 }
663688
664689 // ReSharper disable MemberHidesStaticFromOuterClass
665690 [ Preserve ( AllMembers = true ) ]
666- private sealed class NonGenericEnumerableSerializerFactory < T > : IVariantSerializerFactory
691+ #if SILVERLIGHT
692+ internal
693+ #else
694+ private
695+ #endif // SILVERLIGHT
696+ sealed class NonGenericEnumerableSerializerFactory < T > : IVariantSerializerFactory
667697 where T : IEnumerable
668698 {
669699 public NonGenericEnumerableSerializerFactory ( ) { }
@@ -675,7 +705,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
675705 }
676706
677707 [ Preserve ( AllMembers = true ) ]
678- private sealed class NonGenericCollectionSerializerFactory < T > : IVariantSerializerFactory
708+ #if SILVERLIGHT
709+ internal
710+ #else
711+ private
712+ #endif // SILVERLIGHT
713+ sealed class NonGenericCollectionSerializerFactory < T > : IVariantSerializerFactory
679714 where T : ICollection
680715 {
681716 public NonGenericCollectionSerializerFactory ( ) { }
@@ -687,7 +722,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
687722 }
688723
689724 [ Preserve ( AllMembers = true ) ]
690- private sealed class NonGenericListSerializerFactory < T > : IVariantSerializerFactory
725+ #if SILVERLIGHT
726+ internal
727+ #else
728+ private
729+ #endif // SILVERLIGHT
730+ sealed class NonGenericListSerializerFactory < T > : IVariantSerializerFactory
691731 where T : IList
692732 {
693733 public NonGenericListSerializerFactory ( ) { }
@@ -699,7 +739,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
699739 }
700740
701741 [ Preserve ( AllMembers = true ) ]
702- private sealed class NonGenericDictionarySerializerFactory < T > : IVariantSerializerFactory
742+ #if SILVERLIGHT
743+ internal
744+ #else
745+ private
746+ #endif // SILVERLIGHT
747+ sealed class NonGenericDictionarySerializerFactory < T > : IVariantSerializerFactory
703748 where T : IDictionary
704749 {
705750 public NonGenericDictionarySerializerFactory ( ) { }
@@ -711,7 +756,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
711756 }
712757
713758 [ Preserve ( AllMembers = true ) ]
714- private sealed class EnumerableSerializerFactory < TCollection , TItem > : IVariantSerializerFactory
759+ #if SILVERLIGHT
760+ internal
761+ #else
762+ private
763+ #endif // SILVERLIGHT
764+ sealed class EnumerableSerializerFactory < TCollection , TItem > : IVariantSerializerFactory
715765 where TCollection : IEnumerable < TItem >
716766 {
717767 public EnumerableSerializerFactory ( ) { }
@@ -723,7 +773,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
723773 }
724774
725775 [ Preserve ( AllMembers = true ) ]
726- private sealed class CollectionSerializerFactory < TCollection , TItem > : IVariantSerializerFactory
776+ #if SILVERLIGHT
777+ internal
778+ #else
779+ private
780+ #endif // SILVERLIGHT
781+ sealed class CollectionSerializerFactory < TCollection , TItem > : IVariantSerializerFactory
727782 where TCollection : ICollection < TItem >
728783 {
729784 public CollectionSerializerFactory ( ) { }
@@ -749,7 +804,12 @@ public MessagePackSerializer Create( SerializationContext context, Type targetTy
749804#endif // !NETFX_35 && !UNITY && !NETFX_40 && !( SILVERLIGHT && !WINDOWS_PHONE )
750805
751806 [ Preserve ( AllMembers = true ) ]
752- private sealed class DictionarySerializerFactory < TDictionary , TKey , TValue > : IVariantSerializerFactory
807+ #if SILVERLIGHT
808+ internal
809+ #else
810+ private
811+ #endif // SILVERLIGHT
812+ sealed class DictionarySerializerFactory < TDictionary , TKey , TValue > : IVariantSerializerFactory
753813 where TDictionary : IDictionary < TKey , TValue >
754814 {
755815 public DictionarySerializerFactory ( ) { }
0 commit comments