FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (270)
151private State[] _stateTable;
152private State _currentState;
215private static readonly State[] s_stateTableDefault = {
218/* Token.PI */ State.Prolog, State.Prolog, State.PostDTD, State.Content, State.Content, State.Content, State.Error, State.Epilog,
219/* Token.Doctype */ State.PostDTD, State.PostDTD, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error,
220/* Token.Comment */ State.Prolog, State.Prolog, State.PostDTD, State.Content, State.Content, State.Content, State.Error, State.Epilog,
221/* Token.CData */ State.Content, State.Content, State.Error, State.Content, State.Content, State.Content, State.Error, State.Epilog,
222/* Token.StartElement */ State.Element, State.Element, State.Element, State.Element, State.Element, State.Element, State.Error, State.Element,
223/* Token.EndElement */ State.Error, State.Error, State.Error, State.Content, State.Content, State.Content, State.Error, State.Error,
224/* Token.LongEndElement */ State.Error, State.Error, State.Error, State.Content, State.Content, State.Content, State.Error, State.Error,
225/* Token.StartAttribute */ State.AttrOnly, State.Error, State.Error, State.Attribute, State.Attribute, State.Error, State.Error, State.Error,
226/* Token.EndAttribute */ State.Error, State.Error, State.Error, State.Error, State.Element, State.Error, State.Epilog, State.Error,
227/* Token.Content */ State.Content, State.Content, State.Error, State.Content, State.Attribute, State.Content, State.Attribute, State.Epilog,
228/* Token.Base64 */ State.Content, State.Content, State.Error, State.Content, State.Attribute, State.Content, State.Attribute, State.Epilog,
229/* Token.RawData */ State.Prolog, State.Prolog, State.PostDTD, State.Content, State.Attribute, State.Content, State.Attribute, State.Epilog,
230/* Token.Whitespace */ State.Prolog, State.Prolog, State.PostDTD, State.Content, State.Attribute, State.Content, State.Attribute, State.Epilog,
233private static readonly State[] s_stateTableDocument = {
236/* Token.PI */ State.Error, State.Prolog, State.PostDTD, State.Content, State.Content, State.Content, State.Error, State.Epilog,
237/* Token.Doctype */ State.Error, State.PostDTD, State.Error, State.Error, State.Error, State.Error, State.Error, State.Error,
238/* Token.Comment */ State.Error, State.Prolog, State.PostDTD, State.Content, State.Content, State.Content, State.Error, State.Epilog,
239/* Token.CData */ State.Error, State.Error, State.Error, State.Content, State.Content, State.Content, State.Error, State.Error,
240/* Token.StartElement */ State.Error, State.Element, State.Element, State.Element, State.Element, State.Element, State.Error, State.Error,
241/* Token.EndElement */ State.Error, State.Error, State.Error, State.Content, State.Content, State.Content, State.Error, State.Error,
242/* Token.LongEndElement */ State.Error, State.Error, State.Error, State.Content, State.Content, State.Content, State.Error, State.Error,
243/* Token.StartAttribute */ State.Error, State.Error, State.Error, State.Attribute, State.Attribute, State.Error, State.Error, State.Error,
244/* Token.EndAttribute */ State.Error, State.Error, State.Error, State.Error, State.Element, State.Error, State.Error, State.Error,
245/* Token.Content */ State.Error, State.Error, State.Error, State.Content, State.Attribute, State.Content, State.Error, State.Error,
246/* Token.Base64 */ State.Error, State.Error, State.Error, State.Content, State.Attribute, State.Content, State.Error, State.Error,
247/* Token.RawData */ State.Error, State.Prolog, State.PostDTD, State.Content, State.Attribute, State.Content, State.Error, State.Epilog,
248/* Token.Whitespace */ State.Error, State.Prolog, State.PostDTD, State.Content, State.Attribute, State.Content, State.Error, State.Epilog,
270_currentState = State.Start;
324if (_currentState != State.Start)
393if (_currentState != State.Epilog)
395if (_currentState == State.Closed)
405_currentState = State.Start;
410_currentState = State.Error;
449_currentState = State.Error;
526_currentState = State.Error;
680_currentState = State.Error;
694_currentState = State.Error;
719_currentState = State.Error;
743_currentState = State.Error;
766_currentState = State.Error;
782_currentState = State.Error;
797_currentState = State.Error;
821_currentState = State.Error;
839_currentState = State.Error;
854_currentState = State.Error;
870_currentState = State.Error;
885_currentState = State.Error;
900_currentState = State.Error;
927_currentState = State.Error;
943_currentState = State.Error;
955case State.Start:
957case State.Prolog:
958case State.PostDTD:
960case State.Element:
962case State.Attribute:
963case State.AttrOnly:
965case State.Content:
966case State.Epilog:
968case State.Error:
970case State.Closed:
991_currentState = State.Closed;
1013_currentState = State.Error;
1031if (_currentState != State.Attribute)
1053_currentState = State.Error;
1123_currentState = State.Error;
1135if (_currentState != State.Start)
1140_currentState = State.Prolog;
1162_currentState = State.Error;
1169if (_currentState == State.Closed)
1173else if (_currentState == State.Error)
1175throw new InvalidOperationException(string.Format(ResXml.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)State.Error]));
1178State newState = _stateTable[(int)token * 8 + (int)_currentState];
1179if (newState == State.Error)
1187if (_indented && _currentState != State.Start)
1197if (_currentState == State.Attribute)
1202else if (_currentState == State.Element)
1210else if (_indented && _currentState != State.Start)
1222if (_currentState == State.Attribute)
1226if (_currentState == State.Content)
1236newState = State.Epilog;
1245if (_currentState == State.Attribute)
1250else if (_currentState == State.Element)
1273if (_currentState == State.Element && _lastToken != Token.Content)
1277if (newState == State.Content)
1340_currentState = State.Error;