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