private async ValueTask <ProcessNodeResult> ReadNext(bool useAsync) { var read = await ReadInnerReader(useAsync).ConfigureAwait(false); if (!read) { if (_sourceReaders?.Count > 0) { InnerReader.Close(); InnerReader = _sourceReaders.Pop(); return(ProcessNodeResult.Continue); } return(ProcessNodeResult.Complete); } switch (InnerReader.NodeType) { case XmlNodeType.XmlDeclaration: case XmlNodeType.Document: case XmlNodeType.DocumentType: case XmlNodeType.DocumentFragment: return(_sourceReaders?.Count > 0 ? ProcessNodeResult.Continue : ProcessNodeResult.Ready); case XmlNodeType.Element when IsIncludeElement(): var result = await ProcessIncludeElement(useAsync).ConfigureAwait(false); return(result ? ProcessNodeResult.Ready : ProcessNodeResult.Complete); default: return(ProcessNodeResult.Ready); } }
/// <summary> /// Close the inner reader /// </summary> public void Close() { if (InnerReader != null) { InnerReader.Close(); InnerReader = null; } }
/// <summary> /// Close the inner reader /// </summary> private void Close() { if (InnerReader != null) { InnerReader.Close(); InnerReader = null; } }
public override void Close() { InnerReader.Close(); if (_txnlock != null) { _txnlock.CloseReader(); _txnlock = null; } }
public override void Close() { if (_sourceReaders is not null) { while (_sourceReaders.Count > 0) { InnerReader.Close(); InnerReader = _sourceReaders.Pop(); } } base.Close(); }
public IEnumerator <IFeatureDataRecord> GetEnumerator() { try { while (InnerReader.Read()) { Monitor(); yield return(this); } } finally { InnerReader.Close(); } }
public void Close() { try { do { if (InnerReader.FieldCount > 0 && InnerReader.GetName(0) == "XCMD") { m_SqlQuery.AddToXCmdDataTables(InnerReader); } }while (InnerReader.NextResult()); } finally { #if !Publish m_SqlQuery.RunInfoEnd(); #endif InnerReader.Close(); } }
public void Close() { InnerReader.Close(); }
public override void Close() { InnerReader.Close(); }