25 references to GetSerializerFor
PresentationFramework (1)
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1476return ValueSerializer.GetSerializerFor(type);
System.Xaml (4)
System\Windows\Markup\ValueSerializer.cs (2)
175ValueSerializer? result = GetSerializerFor(descriptor.PropertyType); 208return GetSerializerFor(type);
System\Xaml\Schema\BuiltInValueConverter.cs (1)
213ValueSerializer stringSerializer = ValueSerializer.GetSerializerFor(typeof(string));
System\Xaml\XamlObjectReader.cs (1)
2848return ValueSerializer.GetSerializerFor(type);
System.Xaml.Tests (20)
System\Windows\Markup\StringValueSerializerTests.cs (5)
14ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 21ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 30ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 37ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 46ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!;
System\Windows\Markup\ValueSerializerTests.cs (15)
129Assert.NotNull(ValueSerializer.GetSerializerFor(type)); 136Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 143Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute))); 150Assert.Null(ValueSerializer.GetSerializerFor(typeof(ValueSerializer))); 157ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 164ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 171ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 178ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 200Assert.Null(ValueSerializer.GetSerializerFor(type)); 207Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute))); 214Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute))); 221Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 223Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 229Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!)); 236Assert.Throws<InvalidCastException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute)));