private static ResultsetFormatter ReadRowsetResponsePrivate(XmlReader reader, InlineErrorHandlingType inlineErrorHandling, DataTable inTable, bool schemaOnly, Dictionary <string, bool> columnsToConvertTimeFor) { RowsetFormatter rowsetFormatter = new RowsetFormatter(); if (reader.IsEmptyElement) { reader.Skip(); } else { XmlaClient.StartRowsetResponseS(reader); rowsetFormatter.ReadRowset(reader, inlineErrorHandling, inTable, inTable == null || inTable.Columns.Count <= 1, schemaOnly, columnsToConvertTimeFor); XmlaClient.EndRowsetResponseS(reader); } return(rowsetFormatter); }
private bool InternalRead() { if (this.isClosed) { throw new InvalidOperationException(XmlaSR.DataReaderClosedError); } if (this.xmlReader == null || this.xmlReader.ReadState == ReadState.Closed) { throw new InvalidOperationException(); } if (this.emptyResult) { XmlaClient.CheckForException(this.xmlReader, null, true); return(false); } if (this.dataReady) { this.CompletePreviousRow(); } this.dataReady = this.BeginNewRow(); if (this.dataReady) { if (!this.sequentialAccess) { int num = this.FieldCount; if (this.parentReader != null) { num++; } object[] array = new object[num]; this.GetRowXmlValues(array); if (this.parentReader != null) { array[this.ParentId] = this.currentParentRow; } this.dtStore.Rows.Add(array); } } else if (this.Depth == 0) { XmlaClient.EndRowsetResponseS(this.xmlReader); } return(this.dataReady); }