25 references to GetSerializerFor
PresentationFramework (1)
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1469return ValueSerializer.GetSerializerFor(type);
System.Xaml (4)
System\Windows\Markup\ValueSerializer.cs (2)
174ValueSerializer? result = GetSerializerFor(descriptor.PropertyType); 207return GetSerializerFor(type);
System\Xaml\Schema\BuiltInValueConverter.cs (1)
213ValueSerializer stringSerializer = ValueSerializer.GetSerializerFor(typeof(string));
System\Xaml\XamlObjectReader.cs (1)
2843return ValueSerializer.GetSerializerFor(type);
System.Xaml.Tests (20)
System\Windows\Markup\StringValueSerializerTests.cs (5)
13ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 20ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 29ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 36ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!; 45ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(string))!;
System\Windows\Markup\ValueSerializerTests.cs (15)
128Assert.NotNull(ValueSerializer.GetSerializerFor(type)); 135Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 142Assert.IsType<CustomValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ClassWithValueSerializerAttribute))); 149Assert.Null(ValueSerializer.GetSerializerFor(typeof(ValueSerializer))); 156ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 163ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 170ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 177ValueSerializer serializer = ValueSerializer.GetSerializerFor(typeof(ClassWithPublicTypeConverterAttribute))!; 199Assert.Null(ValueSerializer.GetSerializerFor(type)); 206Assert.Throws<ArgumentNullException>("typeName", () => ValueSerializer.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute))); 213Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute))); 220Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 222Assert.IsType<DateTimeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(DateTime))); 228Assert.Throws<ArgumentNullException>("type", () => ValueSerializer.GetSerializerFor((Type)null!)); 235Assert.Throws<InvalidCastException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute)));