3 writes to _context
dotnet-svcutil-lib (3)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (3)
1544_context = (ValidationState)_validationStack.Push(); 1547_context = new ValidationState(); 1574_context = (ValidationState)_validationStack.Peek();
148 references to _context
dotnet-svcutil-lib (148)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (148)
446_context.Validity = XmlSchemaValidity.Invalid; 472_context.ElementDecl = elementDecl; 479_context.NeedValidateChildren = _processContents != XmlSchemaContentProcessing.Skip; 481elementDecl.ContentValidator.InitValidation(_context); 491schemaInfo.IsNil = _context.IsNill; 492schemaInfo.Validity = _context.Validity; 553SchemaElementDecl currentElementDecl = _context.ElementDecl; 755SchemaElementDecl currentElementDecl = _context.ElementDecl; 758_context.CheckRequiredAttribute = false; 763schemaInfo.Validity = _context.Validity; 790if (_context.NeedValidateChildren) 792if (_context.IsNill) 794SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(_context.LocalName, _context.Namespace)); 797XmlSchemaContentType contentType = _context.ElementDecl.ContentValidator.ContentType; 821ArrayList names = _context.ElementDecl.ContentValidator.ExpectedParticles(_context, false, _schemaSet); 824SendValidationEvent(ResXml.Sch_InvalidTextInElement, BuildElementName(_context.LocalName, _context.Namespace)); 829SendValidationEvent(ResXml.Sch_InvalidTextInElementExpecting, new string[] { BuildElementName(_context.LocalName, _context.Namespace), PrintExpectedElements(names, true) }); 834if (_context.ElementDecl.DefaultValueTyped != null) 873if (_context.NeedValidateChildren) 875if (_context.IsNill) 877SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(_context.LocalName, _context.Namespace)); 879XmlSchemaContentType contentType = _context.ElementDecl.ContentValidator.ContentType; 898if (_context.ElementDecl.DefaultValueTyped != null) 946SchemaElementDecl currentElementDecl = _context.ElementDecl; 958schemaInfo.IsNil = _context.IsNill; 959schemaInfo.IsDefault = _context.IsDefault; 960Debug.Assert(_context.Validity != XmlSchemaValidity.Valid); 961schemaInfo.Validity = _context.Validity; 963_context.ValidationSkipped = true; 1002if (_context.ElementDecl != null) 1004ArrayList expected = _context.ElementDecl.ContentValidator.ExpectedParticles(_context, false, _schemaSet); 1017SchemaElementDecl elementDecl = _context.ElementDecl; 1052SchemaElementDecl currentElementDecl = _context.ElementDecl; 1074SendValidationEvent(ResXml.Sch_DefaultAttributeNotApplied, new string[2] { attdef.Name.ToString(), QNameString(_context.LocalName, _context.Namespace) }); 1146if (_context.ElementDecl == null) 1150return _context.ElementDecl.ContentValidator.ContentType; 1172return (_processContents == XmlSchemaContentProcessing.Strict || _processContents == XmlSchemaContentProcessing.Lax) && _context.ElementDecl != null && !_context.ValidationSkipped; 1183if (!_compiledSchemaInfo.Contains(_context.Namespace)) 1205SchemaElementDecl contextElementDecl = _context.ElementDecl; 1214if (_context.CheckRequiredAttribute && contextElementDecl.HasRequiredAttribute) 1218if (!_context.IsNill) 1220if (_context.NeedValidateChildren) 1258if (!contextElementDecl.ContentValidator.CompleteValidation(_context)) 1260CompleteValidationError(_context, _eventHandler, _nsResolver, _sourceUriString, _positionInfo.LineNumber, _positionInfo.LinePosition, _schemaSet); 1261_context.Validity = XmlSchemaValidity.Invalid; 1279schemaInfo.IsNil = _context.IsNill; 1280schemaInfo.IsDefault = _context.IsDefault; 1281if (_context.Validity == XmlSchemaValidity.NotKnown && StrictlyAssessed) 1283_context.Validity = XmlSchemaValidity.Valid; 1285schemaInfo.Validity = _context.Validity; 1339if (_context.NeedValidateChildren) 1341if (_context.IsNill) 1343SendValidationEvent(ResXml.Sch_ContentInNill, QNameString(_context.LocalName, _context.Namespace)); 1346ContentValidator contentValidator = _context.ElementDecl.ContentValidator; 1347if (contentValidator.ContentType == XmlSchemaContentType.Mixed && _context.ElementDecl.Presence == SchemaDeclBase.Use.Fixed) 1349SendValidationEvent(ResXml.Sch_ElementInMixedWithFixed, QNameString(_context.LocalName, _context.Namespace)); 1358particle = _context.ElementDecl.ContentValidator.ValidateElement(head, _context, out errorCode); 1367_processContents = _context.ProcessContents = XmlSchemaContentProcessing.Skip; 1395_processContents = _context.ProcessContents = XmlSchemaContentProcessing.Skip; 1400_context.NeedValidateChildren = true; //This will be reset to false once member match is not found 1405ElementValidationError(elementName, _context, _eventHandler, _nsResolver, _sourceUriString, _positionInfo.LineNumber, _positionInfo.LinePosition, _schemaSet); 1407_processContents = _context.ProcessContents = XmlSchemaContentProcessing.Skip; 1446SchemaElementDecl currentElementDecl = _context.ElementDecl; 1447if (!_context.IsNill) 1451SchemaElementDecl declBeforeXsi = _context.ElementDeclBeforeXsi; 1458SendValidationEvent(ResXml.Sch_InvalidElementDefaultValue, new string[] { currentElementDecl.DefaultValueRaw, QNameString(_context.LocalName, _context.Namespace) }); 1462_context.IsDefault = true; 1467_context.IsDefault = true; 1491SchemaElementDecl currentElementDecl = _context.ElementDecl; 1493if (!_context.IsNill) 1505SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName, _context.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception); 1510SendValidationEvent(ResXml.Sch_FixedElementValue, QNameString(_context.LocalName, _context.Namespace)); 1545if (_context == null) 1548_validationStack.AddToTop(_context); 1550_context.LocalName = elementName.Name; 1551_context.Namespace = elementName.Namespace; 1552_context.HasMatched = false; 1553_context.IsNill = false; 1554_context.IsDefault = false; 1555_context.CheckRequiredAttribute = true; 1556_context.ValidationSkipped = false; 1557_context.Validity = XmlSchemaValidity.NotKnown; 1558_context.NeedValidateChildren = false; 1559_context.ProcessContents = _processContents; 1560_context.ElementDeclBeforeXsi = null; 1561_context.Constr = null; //resetting the constraints to be null incase context != null 1577_context.Validity = XmlSchemaValidity.Invalid; 1581_context.ValidationSkipped = true; 1583_processContents = _context.ProcessContents; 1680_context.IsNill = XmlConvert.ToBoolean(xsiNil); 1681if (_context.IsNill && elementDecl.Presence == SchemaDeclBase.Use.Fixed) 1697SendValidationEvent(ResXml.Sch_AbstractElement, QNameString(_context.LocalName, _context.Namespace)); 1736SendValidationEvent(ResXml.Sch_XsiTypeBlockedEx, new string[] { xsiTypeName.ToString(), QNameString(_context.LocalName, _context.Namespace) }); 1749_context.ElementDeclBeforeXsi = elementDecl; 1761_processContents = _context.ProcessContents = XmlSchemaContentProcessing.Skip; 1762_context.NeedValidateChildren = false; 1766_processContents = _context.ProcessContents = XmlSchemaContentProcessing.Skip; 1767_context.NeedValidateChildren = false; 1768SendValidationEvent(ResXml.Sch_UndeclaredElement, QNameString(_context.LocalName, _context.Namespace)); 1772SendValidationEvent(ResXml.Sch_NoElementSchemaFound, QNameString(_context.LocalName, _context.Namespace), XmlSeverityType.Warning); 1778if (_context.ElementDecl.IsAbstract) 1780SendValidationEvent(ResXml.Sch_AbstractElement, QNameString(_context.LocalName, _context.Namespace)); 1787if (ProcessIdentityConstraints && _context.ElementDecl.Constraints != null) 1836SchemaElementDecl elementDecl = _context.ElementDecl; 1838if (_context.IsNill) 1844_context.IsDefault = true; 1931_IDs.Add(name, _context.LocalName); 1993SchemaDeclBase decl = _context.ElementDecl as SchemaDeclBase; 2001SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName, _context.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception); 2006SendValidationEvent(ResXml.Sch_FixedElementValue, QNameString(_context.LocalName, _context.Namespace)); 2146SchemaElementDecl beforeXsiDecl = _context.ElementDeclBeforeXsi; 2147SchemaElementDecl currentDecl = _context.ElementDecl; 2187SchemaElementDecl currentElementDecl = _context.ElementDecl; 2188_context.Constr = new ConstraintStruct[currentElementDecl.Constraints.Length]; 2192_context.Constr[id++] = new ConstraintStruct(currentElementDecl.Constraints[i]); 2197for (int i = 0; i < _context.Constr.Length; ++i) 2199if (_context.Constr[i].constraint.Role == CompiledIdentityConstraint.ConstraintRole.Keyref) 2214if (constraintStructures[j].constraint.name == _context.Constr[i].constraint.refer) 2221_context.Constr[i].qualifiedTable = constraintStructures[j].keyrefTable; 2234SendValidationEvent(ResXml.Sch_RefNotInScope, QNameString(_context.LocalName, _context.Namespace)); 2248SchemaElementDecl currentElementDecl = _context.ElementDecl; 2249string localName = _context.LocalName; 2250string namespaceUri = _context.Namespace; 2351string localName = _context.LocalName; 2352string namespaceUri = _context.Namespace; 2869_context.Validity = XmlSchemaValidity.Invalid;