21 references to GetSerializerFor
PresentationFramework (10)
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
70
ValueSerializer valueSerializer = ValueSerializer.
GetSerializerFor
(ObjectType, Context);
689
return ValueSerializer.
GetSerializerFor
(PropertyType, GetItemContext());
1002
ValueSerializer serializer = ValueSerializer.
GetSerializerFor
(_object.ObjectType, _object.Context);
1027
ValueSerializer serializer = ValueSerializer.
GetSerializerFor
(_object.ObjectType, _object.Context);
System\Windows\Markup\RoutedEventValueSerializer.cs (4)
19
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
24
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
32
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), context);
56
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), context);
System\Windows\PropertyPath.cs (1)
884
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), serializerContext);
System\Windows\PropertyPathConverter.cs (1)
172
typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), serializerContext);
System.Xaml.Tests (11)
System\Windows\Markup\ValueSerializerTests.cs (11)
130
Assert.NotNull(ValueSerializer.
GetSerializerFor
(type, null));
137
Assert.IsType<DateTimeValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(DateTime), null));
144
Assert.IsType<CustomValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(ClassWithValueSerializerAttribute), null));
151
Assert.Null(ValueSerializer.
GetSerializerFor
(typeof(ValueSerializer), null));
201
Assert.Null(ValueSerializer.
GetSerializerFor
(type, null));
208
Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.
GetSerializerFor
(typeof(ClassWithNullStringTypeConverterAttribute), null!));
215
Assert.Throws<ArgumentException>(() => ValueSerializer.
GetSerializerFor
(typeof(ClassWithEmptyTypeConverterAttribute), null!));
230
Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.
GetSerializerFor
((Type)null!, null));
237
Assert.Throws<InvalidCastException>(() => ValueSerializer.
GetSerializerFor
(typeof(ClassWithInvalidValueSerializerAttribute), null));
245
Assert.Same(serializer, ValueSerializer.
GetSerializerFor
(typeof(int), context));
252
Assert.IsType<CustomValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(ClassWithValueSerializerAttribute), context));