/// <summary> /// Moves the read position back to the start of the Data Set (<see cref="IDataReaderEngine.KeyablePosition" /> moved /// back to -1) /// </summary> public override void Reset() { base.Reset(); this.CloseStreams(); this._lastCall = LastCall.Null; this.GroupId = null; this._flatObs = null; try { this._parseInputStream = this.DataLocation.InputStream; this._parser = this._xmlReaderBuilder.Build(this._parseInputStream); this._runAheadParserInputStream = this.DataLocation.InputStream; this._runAheadParser = this._xmlReaderBuilder.Build(this._runAheadParserInputStream); IHeaderRetrievalManager headerRetrievalManager = new DataHeaderRetrievalManager(this._parser, this.DefaultDsd); this.Header = headerRetrievalManager.Header; string dimensionAll = DimensionAtObservation.GetFromEnum(DimensionAtObservationEnumType.All).Value; // .NET Implementation note. Because we need to share the ProcessHeader with CrossSectionalDataReaderEngine this._noSeries = this.Header.Structures.Any(reference => string.Equals(reference.DimensionAtObservation, dimensionAll)); } catch (XmlException e) { _log.Error("While reseting the reader and processing the header", e); this.Close(); throw; } }
/// <summary> /// Moves the read position back to the start of the Data Set (<see cref="IDataReaderEngine.KeyablePosition" /> moved /// back to -1) /// </summary> public void Reset() { try { this._inputStream = this._dataLocation.InputStream; this._parser = this._xmlBuilder.Build(this._inputStream); this._runAheadInputStream = this._dataLocation.InputStream; this._runAheadParser = this._xmlBuilder.Build(this._runAheadInputStream); IHeaderRetrievalManager headerRetrievalManager = new DataHeaderRetrievalManager(this._parser, this._defaultDsd); this._headerObject = headerRetrievalManager.Header; } catch (XmlException e) { _log.Error("While reseting the reader and processing the header", e); this.Close(); throw; } }