System\Xml\Core\XmlWellFormedWriterAsync.cs (96)
40State prevState = _currentState;
43if (prevState != State.AfterRootEle)
54_currentState = State.Error;
75_currentState = State.Error;
119_currentState = State.Error;
145_currentState = State.Error;
172_currentState = State.Error;
197_currentState = State.Error;
254_currentState = State.Error;
268_currentState = State.Error;
297_currentState = State.Error;
311_currentState = State.Error;
326_currentState = State.Error;
355_currentState = State.Error;
379_currentState = State.AfterRootEle;
383_currentState = State.TopLevel;
389_currentState = State.Error;
405_currentState = State.Error;
434_currentState = State.Error;
470_currentState = State.Error;
589_currentState = State.Error;
603_currentState = State.Error;
618_currentState = State.Error;
638_currentState = State.Error;
748_currentState = State.Error;
764_currentState = State.Error;
780_currentState = State.Error;
799if (_currentState != State.Start)
825_currentState = State.Error;
850_currentState = State.Error;
876_currentState = State.Error;
902_currentState = State.Error;
930_currentState = State.Error;
957_currentState = State.Error;
978_currentState = State.Error;
992_currentState = State.Error;
1018_currentState = State.Error;
1044_currentState = State.Error;
1070_currentState = State.Error;
1097_currentState = State.Error;
1111_currentState = State.Error;
1124_currentState = State.Error;
1143if (_currentState != State.Attribute)
1169_currentState = State.Error;
1187_currentState = State.Error;
1223_currentState = State.Error;
1229private Task AdvanceStateAsync_ReturnWhenFinish(Task task, State newState)
1242private async Task _AdvanceStateAsync_ReturnWhenFinish(Task task, State newState)
1248private Task AdvanceStateAsync_ContinueWhenFinish(Task task, State newState, Token token)
1261private async Task _AdvanceStateAsync_ContinueWhenFinish(Task task, State newState, Token token)
1271if ((int)_currentState >= (int)State.Closed)
1273if (_currentState == State.Closed || _currentState == State.Error)
1283State newState = _stateTable[((int)token << 4) + (int)_currentState];
1287if ((int)newState >= (int)State.Error)
1291case State.Error:
1295case State.StartContent:
1296return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.Content);
1298case State.StartContentEle:
1299return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.Element);
1301case State.StartContentB64:
1302return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.B64Content);
1304case State.StartDoc:
1305return AdvanceStateAsync_ReturnWhenFinish(WriteStartDocumentAsync(), State.Document);
1307case State.StartDocEle:
1308return AdvanceStateAsync_ReturnWhenFinish(WriteStartDocumentAsync(), State.Element);
1310case State.EndAttrSEle:
1312return AdvanceStateAsync_ReturnWhenFinish(task, State.Element);
1314case State.EndAttrEEle:
1316return AdvanceStateAsync_ReturnWhenFinish(task, State.Content);
1317case State.EndAttrSCont:
1319return AdvanceStateAsync_ReturnWhenFinish(task, State.Content);
1321case State.EndAttrSAttr:
1322return AdvanceStateAsync_ReturnWhenFinish(WriteEndAttributeAsync(), State.Attribute);
1324case State.PostB64Cont:
1327return AdvanceStateAsync_ContinueWhenFinish(_rawWriter.WriteEndBase64Async(), State.Content, token);
1329_currentState = State.Content;
1332case State.PostB64Attr:
1335return AdvanceStateAsync_ContinueWhenFinish(_rawWriter.WriteEndBase64Async(), State.Attribute, token);
1337_currentState = State.Attribute;
1340case State.PostB64RootAttr:
1343return AdvanceStateAsync_ContinueWhenFinish(_rawWriter.WriteEndBase64Async(), State.RootLevelAttr, token);
1345_currentState = State.RootLevelAttr;
1348case State.StartFragEle:
1350newState = State.Element;
1353case State.StartFragCont:
1355newState = State.Content;
1358case State.StartFragB64:
1360newState = State.B64Content;
1363case State.StartRootLevelAttr:
1364return AdvanceStateAsync_ReturnWhenFinish(WriteEndAttributeAsync(), State.RootLevelAttr);
1406if (_currentState != State.Closed)
1412while (_currentState != State.Error && _elemTop > 0)
1419if (_currentState != State.Error && _elemTop > 0)
1428_currentState = State.Error;
1456_currentState = State.Closed;