Esempio n. 1
0
        public void WriteTextContent(TextContentAttribute attribute, object writer,
                                     object value, WriteSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            var current = serializerData.Convert <XElement>();

            current.Value = ObjectUtil.ToString(info.Converter, value, settings);
        }
Esempio n. 2
0
        public void WriteTextContent(TextContentAttribute attribute, object writer,
                                     object value, WriteSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            XmlWriter xmlWriter = writer.Convert <XmlWriter>();

            xmlWriter.WriteString(ObjectUtil.ToString(info.Converter, value, settings));
        }
Esempio n. 3
0
        public void WriteTextContent(TextContentAttribute attribute, object writer,
                                     object value, WriteSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            JsonWriter jsonWriter = writer.Convert <JsonWriter>();

            jsonWriter.WritePropertyName(CONTENT_NAME);
            WriteSimpleJsonValue(jsonWriter, value, settings, info, attribute.UseSourceType);
        }
Esempio n. 4
0
        public void ReadTextContent(TextContentAttribute attribute, object reader,
                                    object receiver, ReadSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            object value = ReadSimpleValue(reader, receiver, settings, info, attribute.AutoTrim);

            SerializerUtil.CheckRequiredContent(attribute, receiver, info,
                                                value.ConvertToString());
        }
Esempio n. 5
0
        public void ReadTextContent(TextContentAttribute attribute, object reader,
                                    object receiver, ReadSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            XElement current = XElementData.GetCurrent(reader);

            string value = current.Value;

            SerializerUtil.CheckRequiredContent(attribute, receiver, info, value);
            SerializerUtil.SetObjectValue(receiver, settings, info, value, attribute.AutoTrim);
        }
Esempio n. 6
0
        public void ReadTextContent(TextContentAttribute attribute, object reader,
                                    object receiver, ReadSettings settings, ObjectPropertyInfo info, object serializerData)
        {
            XmlReader xml = reader.Convert <XmlReader>();

            string value = ReadString(xml);

            SerializerUtil.CheckRequiredContent(attribute, receiver, info, value);
            SerializerUtil.SetObjectValue(receiver, settings, info, value, attribute.AutoTrim);
        }
Esempio n. 7
0
 public void ReadTextContent(TextContentAttribute attribute, object reader,
                             object receiver, ReadSettings settings, ObjectPropertyInfo info, object serializerData)
 {
     throw new NotSupportedException();
 }
Esempio n. 8
0
 public void WriteTextContent(TextContentAttribute attribute, object writer,
                              object value, WriteSettings settings, ObjectPropertyInfo info, object serializerData)
 {
     throw new NotImplementedException();
 }
 public void WriteTextContent(TextContentAttribute attribute, object writer,
                              object value, WriteSettings settings, ObjectPropertyInfo info, object serializerData)
 {
     SetValue(writer, info, ObjectInfo.CONTENT_NAME, value, settings);
 }
Esempio n. 10
0
 public void ReadTextContent(TextContentAttribute attribute, object reader, object receiver,
                             ReadSettings settings, ObjectPropertyInfo info, object serializerData)
 {
     SerializerUtil.SetObjectValue(receiver, settings, info,
                                   GetValue(reader, ObjectInfo.CONTENT_NAME), attribute.AutoTrim);
 }