30 types derived from ValueSerializer
PresentationCore (23)
System\Windows\Input\Command\KeyGestureValueSerializer.cs (1)
23
public class KeyGestureValueSerializer :
ValueSerializer
System\Windows\Input\Command\MouseActionValueSerializer.cs (1)
18
public class MouseActionValueSerializer :
ValueSerializer
System\Windows\Input\Command\MouseGestureValueSerializer.cs (1)
18
public class MouseGestureValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\BrushValueSerializer.cs (1)
22
public class BrushValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\CacheModeValueSerializer.cs (1)
22
public class CacheModeValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\DoubleCollectionValueSerializer.cs (1)
22
public class DoubleCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\GeometryValueSerializer.cs (1)
22
public class GeometryValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\Int32CollectionValueSerializer.cs (1)
22
public class Int32CollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\PathFigureCollectionValueSerializer.cs (1)
22
public class PathFigureCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\PointCollectionValueSerializer.cs (1)
22
public class PointCollectionValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\TransformValueSerializer.cs (1)
22
public class TransformValueSerializer :
ValueSerializer
System\Windows\Media\Converters\Generated\VectorCollectionValueSerializer.cs (1)
22
public class VectorCollectionValueSerializer :
ValueSerializer
System\Windows\Media\FontFamilyValueSerializer.cs (1)
23
public class FontFamilyValueSerializer:
ValueSerializer
System\Windows\Media\ImageSourceValueSerializer.cs (1)
21
public class ImageSourceValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Matrix3DValueSerializer.cs (1)
22
public class Matrix3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point3DCollectionValueSerializer.cs (1)
22
public class Point3DCollectionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point3DValueSerializer.cs (1)
22
public class Point3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Point4DValueSerializer.cs (1)
22
public class Point4DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\QuaternionValueSerializer.cs (1)
22
public class QuaternionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Rect3DValueSerializer.cs (1)
22
public class Rect3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Size3DValueSerializer.cs (1)
22
public class Size3DValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Vector3DCollectionValueSerializer.cs (1)
22
public class Vector3DCollectionValueSerializer :
ValueSerializer
System\Windows\Media3D\Converters\Generated\Vector3DValueSerializer.cs (1)
22
public class Vector3DValueSerializer :
ValueSerializer
PresentationFramework (3)
System\Windows\Input\Command\CommandValueSerializer.cs (1)
14
internal class CommandValueSerializer :
ValueSerializer
System\Windows\Markup\Primitives\MarkupWriter.cs (1)
1506
private class TypeValueSerializer :
ValueSerializer
System\Windows\Markup\RoutedEventValueSerializer.cs (1)
13
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)
19
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)
72
ValueSerializer
typeSerializer = null;
137
ValueSerializer
typeSerializer = context.GetValueSerializerFor(typeof(Type));
System\Windows\Markup\Primitives\ElementMarkupObject.cs (15)
59
ValueSerializer
valueSerializer =
ValueSerializer
.GetSerializerFor(ObjectType, Context);
465
ValueSerializer
serializer = GetValueSerializer();
623
ValueSerializer
serializer = GetValueSerializer();
640
ValueSerializer
serializer = GetValueSerializer();
666
private
ValueSerializer
GetValueSerializer()
676
return
ValueSerializer
.GetSerializerFor(descriptor, GetItemContext());
678
return
ValueSerializer
.GetSerializerFor(PropertyType, GetItemContext());
931
ValueSerializer
typeSerializer = context.GetValueSerializerFor(typeof(Type));
991
ValueSerializer
serializer =
ValueSerializer
.GetSerializerFor(_object.ObjectType, _object.Context);
1016
ValueSerializer
serializer =
ValueSerializer
.GetSerializerFor(_object.ObjectType, _object.Context);
1186
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor descriptor)
1194
public
ValueSerializer
GetValueSerializerFor(Type type)
System\Windows\Markup\Primitives\ExtensionSimplifierMarkupObject.cs (1)
313
ValueSerializer
typeSerializer = _context.GetValueSerializerFor(typeof(Type));
System\Windows\Markup\Primitives\MarkupWriter.cs (4)
1456
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor descriptor)
1461
return
ValueSerializer
.GetSerializerFor(descriptor);
1464
public
ValueSerializer
GetValueSerializerFor(Type type)
1469
return
ValueSerializer
.GetSerializerFor(type);
System\Windows\Markup\RoutedEventValueSerializer.cs (6)
17
return
ValueSerializer
.GetSerializerFor(typeof(Type), context) != null;
22
return
ValueSerializer
.GetSerializerFor(typeof(Type), context) != null;
30
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), context);
54
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), context);
System\Windows\PropertyPath.cs (2)
881
ValueSerializer
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), serializerContext);
System\Windows\PropertyPathConverter.cs (2)
159
ValueSerializer
typeSerializer = null;
166
typeSerializer =
ValueSerializer
.GetSerializerFor(typeof(Type), serializerContext);
System\Windows\SystemKeyConverter.cs (1)
145
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)
106
public static
ValueSerializer
? GetSerializerFor(Type type)
114
return value == s_valueSerializersLock ? null : value as
ValueSerializer
;
118
ValueSerializer
? result = null;
122
result = (
ValueSerializer
?)Activator.CreateInstance(attribute.ValueSerializerType);
165
public static
ValueSerializer
? GetSerializerFor(PropertyDescriptor descriptor)
171
return (
ValueSerializer
?)Activator.CreateInstance(serializerAttribute.ValueSerializerType);
174
ValueSerializer
? result = GetSerializerFor(descriptor.PropertyType);
196
public static
ValueSerializer
? GetSerializerFor(Type type, IValueSerializerContext? context)
200
ValueSerializer
result = context.GetValueSerializerFor(type);
218
public static
ValueSerializer
? GetSerializerFor(PropertyDescriptor descriptor, IValueSerializerContext? context)
222
ValueSerializer
result = context.GetValueSerializerFor(descriptor);
System\Xaml\Runtime\ClrObjectRuntime.cs (2)
153
public override bool CanConvertToString(XAML3.IValueSerializerContext context, XAML3.
ValueSerializer
serializer, object instance)
201
public override string ConvertToString(XAML3.IValueSerializerContext context, XAML3.
ValueSerializer
serializer, object instance)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (2)
110
public override bool CanConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance)
125
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)
31
private NullableReference<XamlValueConverter<
ValueSerializer
>> _valueSerializer;
199
internal XamlValueConverter<
ValueSerializer
> ValueSerializer
System\Xaml\Schema\TypeReflector.cs (2)
60
private NullableReference<XamlValueConverter<XAML3.
ValueSerializer
>> _valueSerializer;
262
internal XamlValueConverter<XAML3.
ValueSerializer
> ValueSerializer
System\Xaml\XamlMember.cs (4)
265
public XamlValueConverter<
ValueSerializer
> ValueSerializer
681
protected virtual XamlValueConverter<
ValueSerializer
> LookupValueSerializer()
683
XamlValueConverter<
ValueSerializer
> result = null;
689
result = SchemaContext.GetValueConverter<
ValueSerializer
>(converterType, null);
System\Xaml\XamlObjectReader.cs (11)
452
ValueSerializer
vs = TypeConverterExtensions.GetConverterInstance(keyType.ValueSerializer);
851
object propertyValue,
ValueSerializer
propertyValueSerializer, TypeConverter propertyConverter, bool isXamlTemplate, XamlMember xamlProperty, SerializerContext context)
1337
ValueSerializer
valueSerializer = TypeConverterExtensions.GetConverterInstance(paramXamlType.ValueSerializer);
1928
ValueSerializer
valueSerializer = null;
2658
public bool CanRoundtripUsingValueSerializer(
ValueSerializer
valueSerializer, TypeConverter typeConverter, object value)
2667
public string ConvertToString(
ValueSerializer
valueSerializer, object value)
2677
public bool TryValueSerializeToString(
ValueSerializer
valueSerializer, TypeConverter propertyConverter, SerializerContext context, ref object value)
2836
public
ValueSerializer
GetValueSerializerFor(PropertyDescriptor propertyDescriptor)
2838
return
ValueSerializer
.GetSerializerFor(propertyDescriptor);
2841
public
ValueSerializer
GetValueSerializerFor(Type type)
2843
return
ValueSerializer
.GetSerializerFor(type);
System\Xaml\XamlRuntime.cs (2)
32
abstract public bool CanConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance);
38
abstract public string ConvertToString(IValueSerializerContext context,
ValueSerializer
serializer, object instance);
System\Xaml\XamlType.cs (5)
273
public XamlValueConverter<
ValueSerializer
> ValueSerializer
1190
protected virtual XamlValueConverter<
ValueSerializer
> LookupValueSerializer()
1198
return SchemaContext.GetValueConverter<
ValueSerializer
>(converterType, null);
1204
XamlValueConverter<
ValueSerializer
> result = BaseType.ValueSerializer;
1214
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;