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