Ejemplo n.º 1
0
        protected override void WriteLobTo(object lob, Stream output)
        {
            var blob = lob as Blob;

            if (blob == null)
            {
                return;
            }
            if (_compression == null)
            {
                blob.WriteTo(output);
            }
            else
            {
                using (Stream cs = _compression.GetCompressor(output))
                    blob.WriteTo(cs);
            }
        }
Ejemplo n.º 2
0
        protected override void WriteLobTo(object lob, Stream output)
        {
            var clob = lob as Clob;

            if (clob == null)
            {
                return;
            }
            if (_compression == null)
            {
                using (var sw = new StreamWriter(output, _encoding))
                    clob.WriteTo(sw);
            }
            else
            {
                using (Stream cs = _compression.GetCompressor(output))
                    using (var sw = new StreamWriter(cs, _encoding))
                        clob.WriteTo(sw);
            }
        }
Ejemplo n.º 3
0
 public XmlWriter GetCompressor(Stream output)
 {
     return(XmlWriter.Create(_compressor == null ? output : _compressor.GetCompressor(output), _writerSettings));
 }