Example #1
0
        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);
            }
        }
Example #2
0
 /// <summary>
 /// Close the inner reader
 /// </summary>
 public void Close()
 {
     if (InnerReader != null)
     {
         InnerReader.Close();
         InnerReader = null;
     }
 }
Example #3
0
 /// <summary>
 /// Close the inner reader
 /// </summary>
 private void Close()
 {
     if (InnerReader != null)
     {
         InnerReader.Close();
         InnerReader = null;
     }
 }
Example #4
0
        public override void Close()
        {
            InnerReader.Close();

            if (_txnlock != null)
            {
                _txnlock.CloseReader();
                _txnlock = null;
            }
        }
Example #5
0
        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();
     }
 }
Example #7
0
        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();
            }
        }
Example #8
0
 public void Close()
 {
     InnerReader.Close();
 }
Example #9
0
 public override void Close()
 {
     InnerReader.Close();
 }