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)
19return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 24return ValueSerializer.GetSerializerFor(typeof(Type), context) != null; 32ValueSerializer typeSerializer = ValueSerializer.GetSerializerFor(typeof(Type), context); 56ValueSerializer 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)
130Assert.NotNull(ValueSerializer.GetSerializerFor(type, null)); 137Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime), null)); 144Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), null)); 151Assert.Null(ValueSerializer.GetSerializerFor(typeof(ValueSerializer), null)); 201Assert.Null(ValueSerializer.GetSerializerFor(type, null)); 208Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute), null!)); 215Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute), null!)); 230Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!, null)); 237Assert.Throws<InvalidCastException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute), null)); 245Assert.Same(serializer, ValueSerializer.GetSerializerFor(typeof(int), context)); 252Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), context));