System.Xml.XsdCachingReader.SkipAsync C# (CSharp) Méthode

SkipAsync() public méthode

public SkipAsync ( ) : Task
Résultat Task
        public override async Task SkipAsync()
        {
            //Skip on caching reader should move to the end of the subtree, past all cached events
            switch (_cachedNode.NodeType)
            {
                case XmlNodeType.Element:
                    if (_coreReader.NodeType != XmlNodeType.EndElement && !_readAhead)
                    { //will be true for IsDefault cases where we peek only one node ahead
                        int startDepth = _coreReader.Depth - 1;
                        while (await _coreReader.ReadAsync().ConfigureAwait(false) && _coreReader.Depth > startDepth)
                            ;
                    }
                    await _coreReader.ReadAsync().ConfigureAwait(false);
                    _cacheState = CachingReaderState.ReaderClosed;
                    _cacheHandler(this);
                    break;

                case XmlNodeType.Attribute:
                    MoveToElement();
                    goto case XmlNodeType.Element;

                default:
                    Debug.Assert(_cacheState == CachingReaderState.Replay);
                    await ReadAsync().ConfigureAwait(false);
                    break;
            }
        }