System\Xml\Core\XmlWellFormedWriterAsync.cs (91)
34State prevState = currentState;
37if (prevState != State.AfterRootEle) {
45currentState = State.Error;
63currentState = State.Error;
98currentState = State.Error;
118currentState = State.Error;
139currentState = State.Error;
161currentState = State.Error;
210currentState = State.Error;
221currentState = State.Error;
245currentState = State.Error;
256currentState = State.Error;
268currentState = State.Error;
291currentState = State.Error;
310currentState = State.AfterRootEle;
313currentState = State.TopLevel;
318currentState = State.Error;
331currentState = State.Error;
354currentState = State.Error;
382currentState = State.Error;
480currentState = State.Error;
491currentState = State.Error;
503currentState = State.Error;
519currentState = State.Error;
607currentState = State.Error;
621currentState = State.Error;
635currentState = State.Error;
655if (currentState != State.Start) {
676currentState = State.Error;
698currentState = State.Error;
718currentState = State.Error;
738currentState = State.Error;
761currentState = State.Error;
782currentState = State.Error;
799currentState = State.Error;
810currentState = State.Error;
839currentState = State.Error;
868currentState = State.Error;
888currentState = State.Error;
919currentState = State.Error;
931currentState = State.Error;
941currentState = State.Error;
958if (currentState != State.Attribute) {
979currentState = State.Error;
993currentState = State.Error;
1021currentState = State.Error;
1027private Task AdvanceStateAsync_ReturnWhenFinish(Task task, State newState) {
1037private async Task _AdvanceStateAsync_ReturnWhenFinish(Task task, State newState) {
1042private Task AdvanceStateAsync_ContinueWhenFinish(Task task, State newState, Token token) {
1052private async Task _AdvanceStateAsync_ContinueWhenFinish(Task task, State newState, Token token) {
1060if ((int)currentState >= (int)State.Closed) {
1061if (currentState == State.Closed || currentState == State.Error) {
1069State newState = stateTable[((int)token << 4) + (int)currentState];
1073if ((int)newState >= (int)State.Error) {
1075case State.Error:
1079case State.StartContent:
1080return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.Content);
1082case State.StartContentEle:
1083return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.Element);
1085case State.StartContentB64:
1086return AdvanceStateAsync_ReturnWhenFinish(StartElementContentAsync(), State.B64Content);
1088case State.StartDoc:
1089return AdvanceStateAsync_ReturnWhenFinish(WriteStartDocumentAsync(), State.Document);
1091case State.StartDocEle:
1092return AdvanceStateAsync_ReturnWhenFinish(WriteStartDocumentAsync(), State.Element);
1094case State.EndAttrSEle:
1096return AdvanceStateAsync_ReturnWhenFinish(task, State.Element);
1098case State.EndAttrEEle:
1100return AdvanceStateAsync_ReturnWhenFinish(task, State.Content);
1101case State.EndAttrSCont:
1103return AdvanceStateAsync_ReturnWhenFinish(task, State.Content);
1105case State.EndAttrSAttr:
1106return AdvanceStateAsync_ReturnWhenFinish(WriteEndAttributeAsync(), State.Attribute);
1108case State.PostB64Cont:
1110return AdvanceStateAsync_ContinueWhenFinish(rawWriter.WriteEndBase64Async(), State.Content, token);
1112currentState = State.Content;
1115case State.PostB64Attr:
1117return AdvanceStateAsync_ContinueWhenFinish(rawWriter.WriteEndBase64Async(), State.Attribute, token);
1119currentState = State.Attribute;
1122case State.PostB64RootAttr:
1124return AdvanceStateAsync_ContinueWhenFinish(rawWriter.WriteEndBase64Async(), State.RootLevelAttr, token);
1126currentState = State.RootLevelAttr;
1129case State.StartFragEle:
1131newState = State.Element;
1134case State.StartFragCont:
1136newState = State.Content;
1139case State.StartFragB64:
1141newState = State.B64Content;
1144case State.StartRootLevelAttr:
1145return AdvanceStateAsync_ReturnWhenFinish(WriteEndAttributeAsync(), State.RootLevelAttr);