FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (45)
91private ValidatorState _currentState;
217_currentState = ValidatorState.None;
381if (_currentState != ValidatorState.None && _currentState != ValidatorState.Finish)
383throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] }));
385_currentState = ValidatorState.Start;
391if (_currentState != ValidatorState.None && _currentState != ValidatorState.Finish)
393throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStateTransition, new string[] { s_methodNames[(int)_currentState], s_methodNames[(int)ValidatorState.Start] }));
403_currentState = ValidatorState.Start;
430CheckStateTransition(ValidatorState.Element, s_methodNames[(int)ValidatorState.Element]);
537ValidatorState toState = _validationStack.Length > 1 ? ValidatorState.Attribute : ValidatorState.TopLevelAttribute;
567XmlSchemaObject pvtAttribute = _currentState == ValidatorState.TopLevelAttribute ? _partialValidationType : null;
628Debug.Assert(_currentState == ValidatorState.TopLevelAttribute); //Re-set state back to start on error with partial validation type
629_currentState = ValidatorState.Start;
747CheckStateTransition(ValidatorState.Attribute, "GetUnspecifiedDefaultAttributes");
753CheckStateTransition(ValidatorState.EndOfAttributes, s_methodNames[(int)ValidatorState.EndOfAttributes]);
787ValidatorState toState = _validationStack.Length > 1 ? ValidatorState.Text : ValidatorState.TopLevelTextOrWS;
870ValidatorState toState = _validationStack.Length > 1 ? ValidatorState.Whitespace : ValidatorState.TopLevelTextOrWS;
940throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement]));
942CheckStateTransition(ValidatorState.SkipToEndElement, s_methodNames[(int)ValidatorState.SkipToEndElement]);
964_currentState = ValidatorState.SkipToEndElement;
974CheckStateTransition(ValidatorState.Finish, s_methodNames[(int)ValidatorState.Finish]);
980if (_currentState == ValidatorState.Start || _currentState == ValidatorState.TopLevelTextOrWS)
1015if (_currentState == ValidatorState.Element || _currentState == ValidatorState.Attribute)
1035else if (_currentState == ValidatorState.Start)
1051_currentState = ValidatorState.Attribute;
1201throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement]));
1203CheckStateTransition(ValidatorState.EndElement, s_methodNames[(int)ValidatorState.EndElement]);
2105private void CheckStateTransition(ValidatorState toState, string methodName)
2109if (_currentState == ValidatorState.None)
2111throw new InvalidOperationException(string.Format(ResXml.Sch_InvalidStartTransition, new string[] { methodName, s_methodNames[(int)ValidatorState.Start] }));