21 references to GetSerializerFor
PresentationFramework (10)
System\Windows\Markup\Primitives\ElementMarkupObject.cs (4)
70ValueSerializer valueSerializer = ValueSerializer.GetSerializerFor(ObjectType, Context); 689return ValueSerializer.GetSerializerFor(PropertyType, GetItemContext()); 1002ValueSerializer serializer = ValueSerializer.GetSerializerFor(_object.ObjectType, _object.Context); 1027ValueSerializer serializer = ValueSerializer.GetSerializerFor(_object.ObjectType, _object.Context);
System\Windows\Markup\RoutedEventValueSerializer.cs (4)
18return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 23return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 31ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), context); 55ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), context);
System\Windows\PropertyPath.cs (1)
884ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), serializerContext);
System\Windows\PropertyPathConverter.cs (1)
172typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), serializerContext);
System.Xaml.Tests (11)
System\Windows\Markup\ValueSerializerTests.cs (11)
129Assert.NotNull(ValueSerializer.GetSerializerFor(type, null)); 136Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime), null)); 143Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), null)); 150Assert.Null(ValueSerializer.GetSerializerFor(typeof(ValueSerializer), null)); 200Assert.Null(ValueSerializer.GetSerializerFor(type, null)); 207Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute), null!)); 214Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute), null!)); 229Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!, null)); 236Assert.Throws<InvalidCastException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute), null)); 244Assert.Same(serializer, ValueSerializer.GetSerializerFor(typeof(int), context)); 251Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), context));