protected override void Dispose(bool disposing) { if (disposing) { try { if (this.AvroWriter != null) { this.AvroWriter.Flush(); this.AvroWriter.Dispose(); } if (this.outputStream != null) { this.outputStream.Flush(); this.outputStream.Dispose(); } } finally { this.AvroWriter = null; this.outputStream = null; } } base.Dispose(disposing); }
internal ODataAvroOutputContext( ODataFormat format, ODataMessageInfo messageInfo, ODataMessageWriterSettings messageWriterSettings) : base(format, messageInfo, messageWriterSettings) { this.outputStream = messageInfo.MessageStream; this.AvroWriter = new AvroWriter(new StreamWrapper(outputStream)); }
internal ODataAvroOutputContext( ODataFormat format, Stream messageStream, Encoding encoding, ODataMessageWriterSettings messageWriterSettings, bool writingResponse, bool synchronous, IEdmModel model, IODataUrlResolver urlResolver) : base(format, messageWriterSettings, writingResponse, synchronous, model, urlResolver) { this.outputStream = messageStream; this.AvroWriter = new AvroWriter(new StreamWrapper(outputStream)); }
internal ODataAvroOutputContext( ODataFormat format, Stream messageStream, Encoding encoding, ODataMessageWriterSettings messageWriterSettings, bool writingResponse, bool synchronous, IEdmModel model, IODataUrlResolver urlResolver) : base(format, messageWriterSettings, writingResponse, synchronous, model, urlResolver) { this.outputStream = messageStream; this.AvroWriter = new AvroWriter(new StreamWrapper(outputStream)); }
protected override void Dispose(bool disposing) { if (disposing) { try { if (this.AvroWriter != null) { this.AvroWriter.Flush(); this.AvroWriter.Dispose(); } if (this.outputStream != null) { this.outputStream.Flush(); this.outputStream.Dispose(); } } finally { this.AvroWriter = null; this.outputStream = null; } } base.Dispose(disposing); }