Exemplo n.º 1
0
 public override object ReadObject(Stream stream)
 {
     CheckNull(stream, "stream");
     return(ReadObject(JsonReaderWriterFactory.CreateJsonReader(stream, XmlDictionaryReaderQuotas.Max)));
 }
 public override void WriteObject(Stream stream, object graph)
 {
     using (var xw = JsonReaderWriterFactory.CreateJsonWriter(stream))
         WriteObject(xw, graph);
 }
Exemplo n.º 3
0
 public static XmlDictionaryWriter CreateJsonWriter(Stream stream, Encoding encoding)
 {
     return(JsonReaderWriterFactory.CreateJsonWriter(stream, encoding, true));
 }
Exemplo n.º 4
0
 public static XmlDictionaryReader CreateJsonReader(byte[] buffer, int offset, int count, XmlDictionaryReaderQuotas quotas)
 {
     return(JsonReaderWriterFactory.CreateJsonReader(buffer, offset, count, (Encoding)null, quotas, (OnXmlDictionaryReaderClose)null));
 }
Exemplo n.º 5
0
 public static XmlDictionaryReader CreateJsonReader(Stream stream, XmlDictionaryReaderQuotas quotas)
 {
     return(JsonReaderWriterFactory.CreateJsonReader(stream, (Encoding)null, quotas, (OnXmlDictionaryReaderClose)null));
 }
Exemplo n.º 6
0
        public override object?ReadObject(Stream stream)
        {
            ArgumentNullException.ThrowIfNull(stream);

            return(ReadObject(JsonReaderWriterFactory.CreateJsonReader(stream, XmlDictionaryReaderQuotas.Max)));
        }