private void DisposeWriters() { if (_writers != null) { foreach (IColumnWriter writer in _writers) { if (writer != null) { writer.Dispose(); } } _writers = null; // Write the schema and query only if the table was valid if (Metadata.RowCount > 0) { // Write table metadata for the completed table TableMetadataSerializer.Write(_xDatabaseContext.StreamProvider, _tableRootPath, Metadata); // On Dispose, tell the StreamProvider to publish the table _xDatabaseContext.StreamProvider.Publish(_tableRootPath); } } }
private void DisposeWriters() { if (_partitionWriter != null) { _metadata.Schema = _partitionWriter.Metadata.Schema; _partitionWriter.Dispose(); _partitionWriter = null; } // Write the schema and query only if the table was valid if (_metadata.RowCount > 0) { // Write table metadata for the partition set TableMetadataSerializer.Write(_xDatabaseContext.StreamProvider, _tableRootPath, _metadata); // On Dispose, tell the StreamProvider to publish the table _xDatabaseContext.StreamProvider.Publish(_tableRootPath); } }