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