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