public YamlKeyElementParser(TypeSerializer <TKey> keyTypeSerializer, TypeSerializer <TElement> elementTypeSerializer) : base(elementTypeSerializer) { KeyTypeSerializer = keyTypeSerializer; KeyWriter = KeyTypeSerializer.GetWriter(); KeyReader = KeyTypeSerializer.GetReader(); }
public YamlPropertySerializer(TypeSerializer <T> serializer, PropertyInfo property) { _writer = serializer.GetWriter(); _reader = serializer.GetReader(); _name = property.Name; }
public YamlElementParser(TypeSerializer <TElement> elementTypeSerializer) { ElementTypeSerializer = elementTypeSerializer; ElementWriter = ElementTypeSerializer.GetWriter(); ElementReader = ElementTypeSerializer.GetReader(); StringReader = new YamlStringSerializer().GetReader(); }
public FastTextElementParser(TypeSerializer <TElement> elementTypeSerializer) { ElementTypeSerializer = elementTypeSerializer; ElementWriter = ElementTypeSerializer.GetWriter(); ElementReader = ElementTypeSerializer.GetReader(); StringReader = new FastTextStringSerializer().GetReader(); }
public TypeReader <Type> GetReader() { TypeReader <Type> typeReader = _typeSerializer.GetReader(); TypeReader <string> stringReader = _stringSerializer.GetReader(); return(value => { string typeString = stringReader(value); Type typeValue = typeReader(typeString); return typeValue; }); }
public NullableSerializer(TypeSerializer <T> serializer) { _serializer = serializer; _reader = _serializer.GetReader(); _writer = _serializer.GetWriter(); }