ValidationType validationType;
XmlSchemaSet schemas = new XmlSchemaSet ();
bool namespaces = true;
- bool validationStarted;
#region ID Constraints
bool checkIdentity = true;
public XmlSchemaSet Schemas {
get { return schemas; }
set {
- if (validationStarted)
+ if (ReadState != ReadState.Initial)
throw new InvalidOperationException ("Schemas must be set before the first call to Read().");
schemas = value;
}
public ValidationType ValidationType {
get { return validationType; }
set {
- if (validationStarted)
+ if (ReadState != ReadState.Initial)
throw new InvalidOperationException ("ValidationType must be set before reading.");
validationType = value;
}
public override bool Read ()
{
- validationStarted = true;
currentDefaultAttribute = -1;
defaultAttributeConsumed = false;
currentAttrType = null;