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)
18
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
23
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
31
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), context);
55
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)
129
Assert.NotNull(ValueSerializer.
GetSerializerFor
(type, null));
136
Assert.IsType<DateTimeValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(DateTime), null));
143
Assert.IsType<CustomValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(ClassWithValueSerializerAttribute), null));
150
Assert.Null(ValueSerializer.
GetSerializerFor
(typeof(ValueSerializer), null));
200
Assert.Null(ValueSerializer.
GetSerializerFor
(type, null));
207
Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.
GetSerializerFor
(typeof(ClassWithNullStringTypeConverterAttribute), null!));
214
Assert.Throws<ArgumentException>(() => ValueSerializer.
GetSerializerFor
(typeof(ClassWithEmptyTypeConverterAttribute), null!));
229
Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.
GetSerializerFor
((Type)null!, null));
236
Assert.Throws<InvalidCastException>(() => ValueSerializer.
GetSerializerFor
(typeof(ClassWithInvalidValueSerializerAttribute), null));
244
Assert.Same(serializer, ValueSerializer.
GetSerializerFor
(typeof(int), context));
251
Assert.IsType<CustomValueSerializer>(ValueSerializer.
GetSerializerFor
(typeof(ClassWithValueSerializerAttribute), context));