21 references to GetSerializerFor
PresentationFramework (10)
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
58
ValueSerializer valueSerializer = ValueSerializer.
GetSerializerFor
(ObjectType, Context);
677
return ValueSerializer.
GetSerializerFor
(PropertyType, GetItemContext());
990
ValueSerializer serializer = ValueSerializer.
GetSerializerFor
(_object.ObjectType, _object.Context);
1015
ValueSerializer serializer = ValueSerializer.
GetSerializerFor
(_object.ObjectType, _object.Context);
System\Windows\Markup\RoutedEventValueSerializer.cs (4)
16
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
21
return ValueSerializer.
GetSerializerFor
(typeof(Type), context) != null;
29
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), context);
53
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), context);
System\Windows\PropertyPath.cs (1)
869
ValueSerializer typeSerializer = ValueSerializer.
GetSerializerFor
(typeof(Type), serializerContext);
System\Windows\PropertyPathConverter.cs (1)
162
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));