30 types derived from ValueSerializer
PresentationCore (23)
System\Windows\Input\Command\KeyGestureValueSerializer.cs (1)
27
public class KeyGestureValueSerializer :
ValueSerializer
System\Windows\Input\Command\MouseActionValueSerializer.cs (1)
23
public class MouseActionValueSerializer :
ValueSerializer
System\Windows\Input\Command\MouseGestureValueSerializer.cs (1)
23
public class MouseGestureValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\BrushValueSerializer.cs (1)
47
public class BrushValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\CacheModeValueSerializer.cs (1)
47
public class CacheModeValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\DoubleCollectionValueSerializer.cs (1)
47
public class DoubleCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\GeometryValueSerializer.cs (1)
47
public class GeometryValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\Int32CollectionValueSerializer.cs (1)
47
public class Int32CollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\PathFigureCollectionValueSerializer.cs (1)
47
public class PathFigureCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\PointCollectionValueSerializer.cs (1)
47
public class PointCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\TransformValueSerializer.cs (1)
47
public class TransformValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\VectorCollectionValueSerializer.cs (1)
47
public class VectorCollectionValueSerializer :
ValueSerializer
System\Windows\Media\FontFamilyValueSerializer.cs (1)
25
public class FontFamilyValueSerializer:
ValueSerializer
System\Windows\Media\ImageSourceValueSerializer.cs (1)
26
public class ImageSourceValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Matrix3DValueSerializer.cs (1)
43
public class Matrix3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point3DCollectionValueSerializer.cs (1)
43
public class Point3DCollectionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point3DValueSerializer.cs (1)
43
public class Point3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point4DValueSerializer.cs (1)
43
public class Point4DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\QuaternionValueSerializer.cs (1)
43
public class QuaternionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Rect3DValueSerializer.cs (1)
43
public class Rect3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Size3DValueSerializer.cs (1)
43
public class Size3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Vector3DCollectionValueSerializer.cs (1)
43
public class Vector3DCollectionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Vector3DValueSerializer.cs (1)
43
public class Vector3DValueSerializer :
ValueSerializer
PresentationFramework (3)
System\Windows\Input\Command\CommandValueSerializer.cs (1)
18
internal class CommandValueSerializer :
ValueSerializer
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1513
private class TypeValueSerializer :
ValueSerializer
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
14
internal class RoutedEventValueSerializer:
ValueSerializer
System.Xaml (3)
ms\Internal\Markup\StringValueSerializer.cs (1)
13
internal sealed class StringValueSerializer :
ValueSerializer
ms\Internal\Markup\TypeConverterValueSerializer.cs (1)
16
internal sealed class TypeConverterValueSerializer :
ValueSerializer
System\Windows\Markup\DateTimeValueSerializer.cs (1)
20
public class DateTimeValueSerializer :
ValueSerializer
System.Xaml.Tests (1)
System\Windows\Markup\ValueSerializerTests.cs (1)
322
public class CustomValueSerializer :
ValueSerializer
{ }
141 references to ValueSerializer
PresentationFramework (33)
System\Windows\Input\Command\CommandValueSerializer.cs (2)
76
ValueSerializer
typeSerializer = null;
141
ValueSerializer
typeSerializer = context.GetValueSerializerFor(typeof(Type));
System\Windows\Markup\Primitives\ElementMarkupObject.cs (15)
70
ValueSerializer
valueSerializer =
ValueSerializer
.GetSerializerFor(ObjectType, Context);
476
ValueSerializer
serializer = GetValueSerializer();
634
ValueSerializer
serializer = GetValueSerializer();
651
ValueSerializer
serializer = GetValueSerializer();
677
private
ValueSerializer
GetValueSerializer()
687
return
ValueSerializer
.GetSerializerFor(descriptor, GetItemContext());
689
return
ValueSerializer
.GetSerializerFor(PropertyType, GetItemContext());
942
ValueSerializer
typeSerializer = context.GetValueSerializerFor(typeof(Type));
1002
ValueSerializer
serializer =
ValueSerializer
.GetSerializerFor(_object.ObjectType, _object.Context);
1027
ValueSerializer
serializer =
ValueSerializer
.GetSerializerFor(_object.ObjectType, _object.Context);
1197
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor descriptor)
1205
public
ValueSerializer
GetValueSerializerFor(Type type)
System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (1)
319
ValueSerializer
typeSerializer = _context.GetValueSerializerFor(typeof(Type));
System\Windows\Markup\Primitives\MarkupWriter.cs (4)
1463
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor descriptor)
1468
return
ValueSerializer
.GetSerializerFor(descriptor);
1471
public
ValueSerializer
GetValueSerializerFor(Type type)
1476
return
ValueSerializer
.GetSerializerFor(type);
System\Windows\Markup\RoutedEventValueSerializer.cs (6)
18
return
ValueSerializer
.GetSerializerFor(typeof(Type), context) != null;
23
return
ValueSerializer
.GetSerializerFor(typeof(Type), context) != null;
31
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), context);
55
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), context);
System\Windows\PropertyPath.cs (2)
884
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), serializerContext);
System\Windows\PropertyPathConverter.cs (2)
165
ValueSerializer
typeSerializer = null;
172
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), serializerContext);
System\Windows\SystemKeyConverter.cs (1)
147
ValueSerializer
typeSerializer = valueSerializerContext.GetValueSerializerFor(typeof(Type));
System.Xaml (48)
System\Windows\Markup\IValueSerializerContext.cs (2)
24
ValueSerializer
GetValueSerializerFor(Type type);
35
ValueSerializer
GetValueSerializerFor(PropertyDescriptor descriptor);
System\Windows\Markup\ValueSerializer.cs (11)
107
public static
ValueSerializer
? GetSerializerFor(Type type)
115
return value == s_valueSerializersLock ? null : value as
ValueSerializer
;
119
ValueSerializer
? result = null;
123
result = (
ValueSerializer
?)Activator.CreateInstance(attribute.ValueSerializerType);
166
public static
ValueSerializer
? GetSerializerFor(PropertyDescriptor descriptor)
172
return (
ValueSerializer
?)Activator.CreateInstance(serializerAttribute.ValueSerializerType);
175
ValueSerializer
? result = GetSerializerFor(descriptor.PropertyType);
197
public static
ValueSerializer
? GetSerializerFor(Type type, IValueSerializerContext? context)
201
ValueSerializer
result = context.GetValueSerializerFor(type);
219
public static
ValueSerializer
? GetSerializerFor(PropertyDescriptor descriptor, IValueSerializerContext? context)
223
ValueSerializer
result = context.GetValueSerializerFor(descriptor);
System\Xaml\Runtime\ClrObjectRuntime.cs (2)
155
public override bool CanConvertToString(XAML3.IValueSerializerContext context, XAML3.
ValueSerializer
serializer, object instance)
203
public override string ConvertToString(XAML3.IValueSerializerContext context, XAML3.
ValueSerializer
serializer, object instance)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (2)
112
public override bool CanConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance)
127
public override string ConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance)
System\Xaml\Schema\BuiltInValueConverter.cs (5)
55
private static XamlValueConverter<
ValueSerializer
> s_StringSerializer;
206
internal static XamlValueConverter<
ValueSerializer
> GetValueSerializer(Type targetType)
213
ValueSerializer
stringSerializer =
ValueSerializer
.GetSerializerFor(typeof(string));
214
s_StringSerializer = new BuiltInValueConverter<
ValueSerializer
>(stringSerializer.GetType(), () => stringSerializer);
System\Xaml\Schema\MemberReflector.cs (2)
33
private NullableReference<XamlValueConverter<
ValueSerializer
>> _valueSerializer;
201
internal XamlValueConverter<
ValueSerializer
> ValueSerializer
System\Xaml\Schema\TypeReflector.cs (2)
62
private NullableReference<XamlValueConverter<XAML3.
ValueSerializer
>> _valueSerializer;
264
internal XamlValueConverter<XAML3.
ValueSerializer
> ValueSerializer
System\Xaml\XamlMember.cs (4)
268
public XamlValueConverter<
ValueSerializer
> ValueSerializer
684
protected virtual XamlValueConverter<
ValueSerializer
> LookupValueSerializer()
686
XamlValueConverter<
ValueSerializer
> result = null;
692
result = SchemaContext.GetValueConverter<
ValueSerializer
>(converterType, null);
System\Xaml\XamlObjectReader.cs (11)
457
ValueSerializer
vs = TypeConverterExtensions.GetConverterInstance(keyType.ValueSerializer);
856
object propertyValue,
ValueSerializer
propertyValueSerializer, TypeConverter propertyConverter, bool isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
1342
ValueSerializer
valueSerializer = TypeConverterExtensions.GetConverterInstance(paramXamlType.ValueSerializer);
1933
ValueSerializer
valueSerializer = null;
2663
public bool CanRoundtripUsingValueSerializer(
ValueSerializer
valueSerializer, TypeConverter typeConverter, object value)
2672
public string ConvertToString(
ValueSerializer
valueSerializer, object value)
2682
public bool TryValueSerializeToString(
ValueSerializer
valueSerializer, TypeConverter propertyConverter, SerializerContext context, ref object value)
2841
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor propertyDescriptor)
2843
return
ValueSerializer
.GetSerializerFor(propertyDescriptor);
2846
public
ValueSerializer
GetValueSerializerFor(Type type)
2848
return
ValueSerializer
.GetSerializerFor(type);
System\Xaml\XamlRuntime.cs (2)
34
abstract public bool CanConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance);
40
abstract public string ConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance);
System\Xaml\XamlType.cs (5)
276
public XamlValueConverter<
ValueSerializer
> ValueSerializer
1193
protected virtual XamlValueConverter<
ValueSerializer
> LookupValueSerializer()
1201
return SchemaContext.GetValueConverter<
ValueSerializer
>(converterType, null);
1207
XamlValueConverter<
ValueSerializer
> result = BaseType.ValueSerializer;
1217
XamlValueConverter<
ValueSerializer
> result = BuiltInValueConverter.GetValueSerializer(underlyingType);
System.Xaml.Tests (60)
System\Windows\Markup\StringValueSerializerTests.cs (10)
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 (50)
128
Assert.NotNull(
ValueSerializer
.GetSerializerFor(type));
129
Assert.NotNull(
ValueSerializer
.GetSerializerFor(type, null));
135
Assert.IsType<DateTimeValueSerializer>(
ValueSerializer
.GetSerializerFor(typeof(DateTime)));
136
Assert.IsType<DateTimeValueSerializer>(
ValueSerializer
.GetSerializerFor(typeof(DateTime), null));
142
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(typeof(ClassWithValueSerializerAttribute)));
143
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), null));
149
Assert.Null(
ValueSerializer
.GetSerializerFor(typeof(
ValueSerializer
)));
150
Assert.Null(
ValueSerializer
.GetSerializerFor(typeof(
ValueSerializer
), null));
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))!;
182
[InlineData(typeof(
ValueSerializer
))]
199
Assert.Null(
ValueSerializer
.GetSerializerFor(type));
200
Assert.Null(
ValueSerializer
.GetSerializerFor(type, null));
206
Assert.Throws<ArgumentNullException>("typeName", () =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute)));
207
Assert.Throws<ArgumentNullException>("typeName", () =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithNullStringTypeConverterAttribute), null!));
213
Assert.Throws<ArgumentException>(() =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute)));
214
Assert.Throws<ArgumentException>(() =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute), null!));
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!));
229
Assert.Throws<ArgumentNullException>("type", () =>
ValueSerializer
.GetSerializerFor((Type)null!, null));
235
Assert.Throws<InvalidCastException>(() =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute)));
236
Assert.Throws<InvalidCastException>(() =>
ValueSerializer
.GetSerializerFor(typeof(ClassWithInvalidValueSerializerAttribute), null));
244
Assert.Same(serializer,
ValueSerializer
.GetSerializerFor(typeof(int), context));
251
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(typeof(ClassWithValueSerializerAttribute), context));
258
Assert.IsType<DateTimeValueSerializer>(
ValueSerializer
.GetSerializerFor(descriptor));
259
Assert.IsType<DateTimeValueSerializer>(
ValueSerializer
.GetSerializerFor(descriptor, null));
266
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(descriptor));
267
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(descriptor, null));
274
Assert.NotNull(
ValueSerializer
.GetSerializerFor(descriptor));
275
Assert.NotNull(
ValueSerializer
.GetSerializerFor(descriptor, null));
286
Assert.Null(
ValueSerializer
.GetSerializerFor(descriptor));
287
Assert.Null(
ValueSerializer
.GetSerializerFor(descriptor, null));
293
Assert.Throws<ArgumentNullException>("descriptor", () =>
ValueSerializer
.GetSerializerFor((PropertyDescriptor)null!));
294
Assert.Throws<ArgumentNullException>("descriptor", () =>
ValueSerializer
.GetSerializerFor((PropertyDescriptor)null!, null));
301
Assert.Throws<InvalidCastException>(() =>
ValueSerializer
.GetSerializerFor(descriptor));
302
Assert.Throws<InvalidCastException>(() =>
ValueSerializer
.GetSerializerFor(descriptor, null));
311
Assert.Same(serializer,
ValueSerializer
.GetSerializerFor(descriptor, context));
319
Assert.IsType<CustomValueSerializer>(
ValueSerializer
.GetSerializerFor(descriptor, context));
439
public
ValueSerializer
? SerializerResult { get; set; }
441
public
ValueSerializer
? GetValueSerializerFor(Type type) => SerializerResult;
443
public
ValueSerializer
? GetValueSerializerFor(PropertyDescriptor type) => SerializerResult;