34 references to GetSerializerFor
PresentationFramework (1)
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1471return ValueSerializer.GetSerializerFor(type);
System.Xaml (4)
System\Windows\Markup\ValueSerializer.cs (2)
172ValueSerializer? result = GetSerializerFor(descriptor.PropertyType); 205return GetSerializerFor(type);
System\Xaml\Schema\BuiltInValueConverter.cs (1)
235ValueSerializer stringSerializer = ValueSerializer.GetSerializerFor(typeof(string));
System\Xaml\XamlObjectReader.cs (1)
2864return ValueSerializer.GetSerializerFor(type);
System.Xaml.Tests (21)
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)));
System\Xaml\XamlTypeTests.cs (1)
4631yield return new object?[] { new SubXamlType(typeof(string), new XamlSchemaContext()), new XamlValueConverter<ValueSerializer>(ValueSerializer.GetSerializerFor(typeof(string))!.GetType(), null) };
WindowsBase.Tests (8)
System\Windows\Input\KeyTests.cs (1)
20Assert.IsType<KeyValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Key)));
System\Windows\Input\ModifierKeysTests.cs (1)
20Assert.IsType<ModifierKeysValueSerializer>(ValueSerializer.GetSerializerFor(typeof(ModifierKeys)));
System\Windows\Int32RectTests.cs (1)
460Assert.IsType<Int32RectValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Int32Rect)));
System\Windows\Media\MatrixTests.cs (1)
5643Assert.IsType<MatrixValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Matrix)));
System\Windows\PointTests.cs (1)
579Assert.IsType<PointValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Point)));
System\Windows\RectTests.cs (1)
3331Assert.IsType<RectValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Rect)));
System\Windows\SizeTests.cs (1)
575Assert.IsType<SizeValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Size)));
System\Windows\VectorTests.cs (1)
860Assert.IsType<VectorValueSerializer>(ValueSerializer.GetSerializerFor(typeof(Vector)));