681 references to State
System.Private.Xml (681)
System\Xml\Core\XmlWellFormedWriter.cs (585)
50private State[] _stateTable; 51private State _currentState; 197private static readonly State[] s_stateTableDocument = { 199/* Token.StartDocument */ State.Document, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 200/* Token.EndDocument */ State.Error, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.Error, State.EndDocument, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 201/* Token.PI */ State.StartDoc, State.TopLevel, State.Document, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 202/* Token.Comment */ State.StartDoc, State.TopLevel, State.Document, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 203/* Token.Dtd */ State.StartDoc, State.TopLevel, State.Document, State.Error, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 204/* Token.StartElement */ State.StartDocEle, State.Element, State.Element, State.StartContentEle, State.Element, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrSEle, State.EndAttrSEle, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 205/* Token.EndElement */ State.Error, State.Error, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrEEle, State.EndAttrEEle, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 206/* Token.StartAttribute */ State.Error, State.Error, State.Error, State.Attribute, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrSAttr, State.EndAttrSAttr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 207/* Token.EndAttribute */ State.Error, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.Element, State.Element, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 208/* Token.Text */ State.Error, State.Error, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Error, State.Attribute, State.SpecialAttr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 209/* Token.CData */ State.Error, State.Error, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 210/* Token.AtomicValue */ State.Error, State.Error, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Error, State.Attribute, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 211/* Token.Base64 */ State.Error, State.Error, State.Error, State.StartContentB64, State.B64Content, State.B64Content, State.B64Attribute, State.Error, State.B64Attribute, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 212/* Token.RawData */ State.StartDoc, State.Error, State.Document, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.Attribute, State.SpecialAttr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, 213/* Token.Whitespace */ State.StartDoc, State.TopLevel, State.Document, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.Attribute, State.SpecialAttr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error 216private static readonly State[] s_stateTableAuto = { 218/* Token.StartDocument */ State.Document, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.StartDocument */ 219/* Token.EndDocument */ State.Error, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.Error, State.EndDocument, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.EndDocument */ 220/* Token.PI */ State.TopLevel, State.TopLevel, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.PI */ 221/* Token.Comment */ State.TopLevel, State.TopLevel, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.Comment */ 222/* Token.Dtd */ State.StartDoc, State.TopLevel, State.Error, State.Error, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.Dtd */ 223/* Token.StartElement */ State.StartFragEle, State.Element, State.Error, State.StartContentEle, State.Element, State.PostB64Cont, State.PostB64Attr, State.Element, State.EndAttrSEle, State.EndAttrSEle, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.StartElement */ 224/* Token.EndElement */ State.Error, State.Error, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrEEle, State.EndAttrEEle, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.EndElement */ 225/* Token.StartAttribute */ State.RootLevelAttr, State.Error, State.Error, State.Attribute, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.EndAttrSAttr, State.EndAttrSAttr, State.Error, State.StartRootLevelAttr, State.StartRootLevelAttr, State.PostB64RootAttr, State.RootLevelAttr, State.Error, /* Token.StartAttribute */ 226/* Token.EndAttribute */ State.Error, State.Error, State.Error, State.Error, State.Error, State.PostB64Cont, State.PostB64Attr, State.Error, State.Element, State.Element, State.Error, State.AfterRootLevelAttr, State.AfterRootLevelAttr, State.PostB64RootAttr, State.Error, State.Error, /* Token.EndAttribute */ 227/* Token.Text */ State.StartFragCont, State.StartFragCont, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Content, State.Attribute, State.SpecialAttr, State.Error, State.RootLevelAttr, State.RootLevelSpecAttr, State.PostB64RootAttr, State.Error, State.Error, /* Token.Text */ 228/* Token.CData */ State.StartFragCont, State.StartFragCont, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Content, State.EndAttrSCont, State.EndAttrSCont, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error, /* Token.CData */ 229/* Token.AtomicValue */ State.StartFragCont, State.StartFragCont, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Content, State.Attribute, State.Error, State.Error, State.RootLevelAttr, State.Error, State.PostB64RootAttr, State.Error, State.Error, /* Token.AtomicValue */ 230/* Token.Base64 */ State.StartFragB64, State.StartFragB64, State.Error, State.StartContentB64, State.B64Content, State.B64Content, State.B64Attribute, State.B64Content, State.B64Attribute, State.Error, State.Error, State.RootLevelB64Attr, State.Error, State.RootLevelB64Attr, State.Error, State.Error, /* Token.Base64 */ 231/* Token.RawData */ State.StartFragCont, State.TopLevel, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.Content, State.Attribute, State.SpecialAttr, State.Error, State.RootLevelAttr, State.RootLevelSpecAttr, State.PostB64RootAttr, State.AfterRootLevelAttr, State.Error, /* Token.RawData */ 232/* Token.Whitespace */ State.TopLevel, State.TopLevel, State.Error, State.StartContent, State.Content, State.PostB64Cont, State.PostB64Attr, State.AfterRootEle, State.Attribute, State.SpecialAttr, State.Error, State.RootLevelAttr, State.RootLevelSpecAttr, State.PostB64RootAttr, State.AfterRootLevelAttr, State.Error, /* Token.Whitespace */ 260_currentState = State.Start; 292if ((int)_currentState <= (int)State.Error) 340State prevState = _currentState; 343if (prevState != State.AfterRootEle) 354_currentState = State.Error; 374_currentState = State.Error; 418_currentState = State.Error; 491_currentState = State.Error; 533_currentState = State.AfterRootEle; 537_currentState = State.TopLevel; 543_currentState = State.Error; 584_currentState = State.AfterRootEle; 588_currentState = State.TopLevel; 594_currentState = State.Error; 730_currentState = State.Error; 849_currentState = State.Error; 864_currentState = State.Error; 879_currentState = State.Error; 898if (_currentState != State.Start) 924_currentState = State.Error; 949_currentState = State.Error; 975_currentState = State.Error; 1001_currentState = State.Error; 1028_currentState = State.Error; 1054_currentState = State.Error; 1080_currentState = State.Error; 1106_currentState = State.Error; 1132_currentState = State.Error; 1151_currentState = State.Error; 1158if (_currentState != State.Closed) 1164while (_currentState != State.Error && _elemTop > 0) 1171if (_currentState != State.Error && _elemTop > 0) 1180_currentState = State.Error; 1208_currentState = State.Closed; 1222_currentState = State.Error; 1251_currentState = State.Error; 1292if (_currentState != State.Attribute) 1319_currentState = State.Error; 1333_currentState = State.Error; 1347_currentState = State.Error; 1361_currentState = State.Error; 1375_currentState = State.Error; 1389_currentState = State.Error; 1403_currentState = State.Error; 1417_currentState = State.Error; 1431_currentState = State.Error; 1457_currentState = State.Error; 1479_currentState = State.Error; 1497_currentState = State.Error; 1525return (_currentState == State.B64Content || _currentState == State.B64Attribute || _currentState == State.RootLevelB64Attr); 1532if (State.Attribute == _currentState) 1533_currentState = State.SpecialAttr; 1534else if (State.RootLevelAttr == _currentState) 1535_currentState = State.RootLevelSpecAttr; 1573_currentState = State.Error; 1843if ((int)_currentState >= (int)State.Closed) 1845if (_currentState == State.Closed || _currentState == State.Error) 1856State newState = _stateTable[((int)token << 4) + (int)_currentState]; 1859if ((int)newState >= (int)State.Error) 1863case State.Error: 1867case State.StartContent: 1869newState = State.Content; 1872case State.StartContentEle: 1874newState = State.Element; 1877case State.StartContentB64: 1879newState = State.B64Content; 1882case State.StartDoc: 1884newState = State.Document; 1887case State.StartDocEle: 1889newState = State.Element; 1892case State.EndAttrSEle: 1895newState = State.Element; 1898case State.EndAttrEEle: 1901newState = State.Content; 1904case State.EndAttrSCont: 1907newState = State.Content; 1910case State.EndAttrSAttr: 1912newState = State.Attribute; 1915case State.PostB64Cont: 1917_currentState = State.Content; 1920case State.PostB64Attr: 1922_currentState = State.Attribute; 1925case State.PostB64RootAttr: 1927_currentState = State.RootLevelAttr; 1930case State.StartFragEle: 1932newState = State.Element; 1935case State.StartFragCont: 1937newState = State.Content; 1940case State.StartFragB64: 1942newState = State.B64Content; 1945case State.StartRootLevelAttr: 1947newState = State.RootLevelAttr; 1974private static string GetStateName(State state) 1976if (state >= State.Error) 2071private void ThrowInvalidStateTransition(Token token, State currentState) 2076case State.AfterRootEle: 2077case State.Start: 2091return (int)_currentState >= (int)State.Closed;
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;