31 references to GetSerializer
System.Windows.Forms.Design (1)
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (1)
848
return
GetSerializer
(objectType, serializerType);
System.Windows.Forms.Design.Tests (30)
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (30)
580
object serializer1 = manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass));
582
Assert.Same(serializer1, manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(PublicDesignerSerializationProvider)));
586
object serializer2 = manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass));
589
Assert.NotSame(serializer2, manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass)));
1182
Assert.Same(expected, manager.
GetSerializer
(objectType, serializerType));
1185
Assert.Same(expected, manager.
GetSerializer
(objectType, serializerType));
1195
Assert.Same(expected, manager.
GetSerializer
(objectType, serializerType));
1198
Assert.Same(expected, manager.
GetSerializer
(objectType, serializerType));
1212
object serializer1 = manager.
GetSerializer
(objectType, typeof(BaseClass));
1216
object serializer2 = manager.
GetSerializer
(objectType, typeof(BaseClass));
1221
Assert.Null(manager.
GetSerializer
(objectType, expectedSerializerType));
1224
Assert.Null(manager.
GetSerializer
(objectType, expectedSerializerType));
1227
Assert.Null(manager.
GetSerializer
(objectType, typeof(object)));
1230
Assert.Null(manager.
GetSerializer
(objectType, typeof(object)));
1233
Assert.Null(manager.
GetSerializer
(objectType, typeof(int)));
1236
Assert.Null(manager.
GetSerializer
(objectType, typeof(int)));
1245
object serializer1 = manager.
GetSerializer
(objectType, typeof(BaseClass));
1249
object serializer2 = manager.
GetSerializer
(objectType, typeof(BaseClass));
1254
object serializer3 = manager.
GetSerializer
(objectType, expectedSerializerType);
1259
object serializer4 = manager.
GetSerializer
(objectType, expectedSerializerType);
1264
object serializer5 = manager.
GetSerializer
(objectType, typeof(object));
1269
object serializer6 = manager.
GetSerializer
(objectType, typeof(object));
1274
Assert.Null(manager.
GetSerializer
(objectType, typeof(int)));
1277
Assert.Null(manager.
GetSerializer
(objectType, typeof(int)));
1284
Assert.Throws<MissingMethodException>(() => manager.
GetSerializer
(null, typeof(ClassWithInterfaceDefaultSerializationProvider)));
1292
Assert.Throws<ArgumentNullException>("serializerType", () => manager.
GetSerializer
(objectType, null));
1761
object serializer1 = manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass));
1763
Assert.Same(serializer1, manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(PublicDesignerSerializationProvider)));
1767
object serializer2 = manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass));
1770
Assert.NotSame(serializer2, manager.
GetSerializer
(typeof(ClassWithPublicDesignerSerializer), typeof(BaseClass)));