10 writes to context
dotnet-svcutil-lib (10)
FrameworkFork\Microsoft.Xml\Xml\schema\dtdvalidator.cs (3)
503context = (ValidationState)_validationStack.Push(); 506context = new ValidationState(); 521context = (ValidationState)_validationStack.Peek();
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (3)
656context = (ValidationState)_validationStack.Push(); 659context = new ValidationState(); 674context = (ValidationState)_validationStack.Peek();
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (4)
128set { context = value; } 795context = (ValidationState)_validationStack.Push(); 798context = new ValidationState(); 821context = (ValidationState)_validationStack.Peek();
198 references to context
dotnet-svcutil-lib (198)
FrameworkFork\Microsoft.Xml\Xml\schema\basevalidator.cs (15)
167if (context.NeedValidateChildren) 169if (context.IsNill) 171SendValidationEvent(ResXml.Sch_ContentInNill, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 174ContentValidator contentValidator = context.ElementDecl.ContentValidator; 178ArrayList names = contentValidator.ExpectedElements(context, false); 181SendValidationEvent(ResXml.Sch_InvalidTextInElement, XmlSchemaValidator.BuildElementName(context.LocalName, context.Namespace)); 186SendValidationEvent(ResXml.Sch_InvalidTextInElementExpecting, new string[] { XmlSchemaValidator.BuildElementName(context.LocalName, context.Namespace), XmlSchemaValidator.PrintExpectedElements(names, false) }); 202if (context.NeedValidateChildren) 204XmlSchemaContentType contentType = context.ElementDecl.ContentValidator.ContentType; 205if (context.IsNill) 207SendValidationEvent(ResXml.Sch_ContentInNill, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace));
FrameworkFork\Microsoft.Xml\Xml\schema\dtdvalidator.cs (48)
106context.ElementDecl != null && 107context.ElementDecl.IsDeclaredInExternal && 108context.ElementDecl.ContentValidator.ContentType == XmlSchemaContentType.ElementOnly) 119if (context.NeedValidateChildren) 121if (context.ElementDecl.ContentValidator == ContentValidator.Empty) 147if (context.NeedValidateChildren) 150context.ElementDecl.ContentValidator.ValidateElement(elementName, context, out errorCode); 153XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 160if (context.ElementDecl != null) 162Reader.SchemaTypeObject = context.ElementDecl.SchemaType; 164if (Reader.IsEmptyElement && context.ElementDecl.DefaultValueTyped != null) 166Reader.TypedValueObject = context.ElementDecl.DefaultValueTyped; 167context.IsNill = true; // reusing IsNill - what is this flag later used for?? 169if (context.ElementDecl.HasRequiredAttribute) 182SchemaAttDef attnDef = context.ElementDecl.GetAttDef(new XmlQualifiedName(reader.LocalName, reader.Prefix)); 185if (context.ElementDecl != null && context.ElementDecl.HasRequiredAttribute) 214if (context.ElementDecl.HasRequiredAttribute) 218context.ElementDecl.CheckAttributes(_attPresence, Reader.StandAlone); 227if (context.ElementDecl.Datatype != null) 242context.ElementDecl = elementDecl; 245context.NeedValidateChildren = true; 246elementDecl.ContentValidator.InitValidation(context); 250SendValidationEvent(ResXml.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 251context.ElementDecl = null; 269if (context.ElementDecl != null) 271if (context.NeedValidateChildren) 273if (!context.ElementDecl.ContentValidator.CompleteValidation(context)) 275XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 293get { return context.ElementDecl != null ? context.ElementDecl.ContentValidator.PreserveWhitespace : false; } 313AddID(name, context.LocalName); 343XmlSchemaDatatype dtype = isAttn ? attdef.Datatype : context.ElementDecl.Datatype; 374SchemaDeclBase decl = isAttn ? (SchemaDeclBase)attdef : (SchemaDeclBase)context.ElementDecl; 394SendValidationEvent(ResXml.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 406SendValidationEvent(ResXml.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 504if (context == null) 507_validationStack.AddToTop(context); 509context.LocalName = elementName.Name; 510context.Namespace = elementName.Namespace; 511context.HasMatched = false; 512context.IsNill = false; 513context.NeedValidateChildren = false;
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (51)
109if (context.NeedValidateChildren) 112context.ElementDecl.ContentValidator.ValidateElement(elementName, context, out errorCode); 115XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 154context.ElementDecl = ThoroughGetElementDecl(); 155if (context.ElementDecl != null) 159context.NeedValidateChildren = true; 160context.ElementDecl.ContentValidator.InitValidation(context); 170if (context.ElementDecl != null) 172if (context.NeedValidateChildren) 174if (!context.ElementDecl.ContentValidator.CompleteValidation(context)) 176XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 228if (schemaInfo.TargetNamespaces.ContainsKey(context.Namespace)) 230SendValidationEvent(ResXml.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 238if (context.ElementDecl != null) 240if (context.ElementDecl.SchemaType != null) 242reader.SchemaTypeObject = context.ElementDecl.SchemaType; 246reader.SchemaTypeObject = context.ElementDecl.Datatype; 248if (reader.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null) 250reader.TypedValueObject = context.ElementDecl.DefaultValueTyped; 251context.IsNill = true; // reusing IsNill 253if (this.context.ElementDecl.HasRequiredAttribute) 271SchemaAttDef attnDef = schemaInfo.GetAttributeXdr(context.ElementDecl, QualifiedName(reader.LocalName, reader.NamespaceURI)); 274if (context.ElementDecl != null && context.ElementDecl.HasRequiredAttribute) 300if (context.ElementDecl.HasDefaultAttribute) 302for (int i = 0; i < context.ElementDecl.DefaultAttDefs.Count; ++i) 304reader.AddDefaultAttribute((SchemaAttDef)context.ElementDecl.DefaultAttDefs[i]); 307if (context.ElementDecl.HasRequiredAttribute) 311context.ElementDecl.CheckAttributes(_attPresence, reader.StandAlone); 319if (context.ElementDecl.Datatype != null) 406get { return context.ElementDecl != null ? context.ElementDecl.ContentValidator.PreserveWhitespace : false; } 423AddID(name, context.LocalName); 464XmlSchemaDatatype dtype = isAttn ? attdef.Datatype : context.ElementDecl.Datatype; 500SchemaDeclBase decl = isAttn ? (SchemaDeclBase)attdef : (SchemaDeclBase)context.ElementDecl; 535SendValidationEvent(ResXml.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 547SendValidationEvent(ResXml.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 657if (context == null) 660_validationStack.AddToTop(context); 662context.LocalName = elementName.Name; 663context.Namespace = elementName.Namespace; 664context.HasMatched = false; 665context.IsNill = false; 666context.NeedValidateChildren = false;
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (84)
194if (context.NeedValidateChildren) 196if (context.IsNill) 201particle = context.ElementDecl.ContentValidator.ValidateElement(elementName, context, out errorCode); 204_processContents = context.ProcessContents = XmlSchemaContentProcessing.Skip; 209XmlSchemaValidator.ElementValidationError(elementName, context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 236SendValidationEvent(ResXml.Sch_UndeclaredElement, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 240SendValidationEvent(ResXml.Sch_NoElementSchemaFound, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace), XmlSeverityType.Warning); 245context.ElementDecl = elementDecl; 248if (context.ElementDecl != null) 251context.NeedValidateChildren = _processContents != XmlSchemaContentProcessing.Skip; 252context.ElementDecl.ContentValidator.InitValidation(context); 334if (context.ElementDecl != null) 336if (!context.IsNill) 338if (context.NeedValidateChildren) 340if (!context.ElementDecl.ContentValidator.CompleteValidation(context)) 342XmlSchemaValidator.CompleteValidationError(context, EventHandler, reader, reader.BaseURI, PositionInfo.LineNumber, PositionInfo.LinePosition, null); 346if (checkDatatype && !context.IsNill) 349if (!(stringValue.Length == 0 && context.ElementDecl.DefaultValueTyped != null)) 397SendValidationEvent(ResXml.Sch_AbstractElement, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 423SendValidationEvent(ResXml.Sch_XsiTypeBlockedEx, new string[] { xsiType.ToString(), XmlSchemaValidator.QNameString(context.LocalName, context.Namespace) }); 435context.IsNill = XmlConvert.ToBoolean(xsiNil); 436if (context.IsNill && elementDecl.DefaultValueTyped != null) 452if (context.ElementDecl != null) 454if (context.ElementDecl.IsAbstract) 456SendValidationEvent(ResXml.Sch_AbstractElement, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 459reader.SchemaTypeObject = context.ElementDecl.SchemaType; 461if (reader.IsEmptyElement && !context.IsNill && context.ElementDecl.DefaultValueTyped != null) 463reader.TypedValueObject = UnWrapUnion(context.ElementDecl.DefaultValueTyped); 464context.IsNill = true; // reusing IsNill 470if (this.context.ElementDecl.HasRequiredAttribute || HasIdentityConstraints) 494SchemaAttDef attnDef = schemaInfo.GetAttributeXsd(context.ElementDecl, attQName, ref skipContents); 498if (context.ElementDecl != null && (context.ElementDecl.HasRequiredAttribute || _startIDConstraint != -1)) 517if (context.ElementDecl == null 543if (context.ElementDecl.HasDefaultAttribute) 545for (int i = 0; i < context.ElementDecl.DefaultAttDefs.Count; ++i) 547SchemaAttDef attdef = (SchemaAttDef)context.ElementDecl.DefaultAttDefs[i]; 557if (context.ElementDecl.HasRequiredAttribute) 561context.ElementDecl.CheckAttributes(_attPresence, reader.StandAlone); 569if (context.ElementDecl.Datatype != null) 666get { return context.ElementDecl != null ? context.ElementDecl.ContentValidator.PreserveWhitespace : false; } 684AddID(name, context.LocalName); 711XmlSchemaDatatype dtype = isAttn ? attdef.Datatype : context.ElementDecl.Datatype; 737SchemaDeclBase decl = isAttn ? (SchemaDeclBase)attdef : (SchemaDeclBase)context.ElementDecl; 746SendValidationEvent(ResXml.Sch_FixedElementValue, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 763SendValidationEvent(ResXml.Sch_ElementValueDataType, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 796if (context == null) 799_validationStack.AddToTop(context); 801context.LocalName = elementName.Name; 802context.Namespace = elementName.Namespace; 803context.HasMatched = false; 804context.IsNill = false; 805context.ProcessContents = _processContents; 806context.NeedValidateChildren = false; 807context.Constr = null; //resetting the constraints to be null incase context != null 822_processContents = context.ProcessContents; 847if (context.ElementDecl != null) 849if (context.ElementDecl.Constraints != null) 868context.Constr = new ConstraintStruct[context.ElementDecl.Constraints.Length]; 870for (int i = 0; i < context.ElementDecl.Constraints.Length; ++i) 872context.Constr[id++] = new ConstraintStruct(context.ElementDecl.Constraints[i]); 877for (int i = 0; i < context.Constr.Length; ++i) 879if (context.Constr[i].constraint.Role == CompiledIdentityConstraint.ConstraintRole.Keyref) 894if (constraints[j].constraint.name == context.Constr[i].constraint.refer) 901context.Constr[i].qualifiedTable = constraints[j].keyrefTable; 914SendValidationEvent(ResXml.Sch_RefNotInScope, XmlSchemaValidator.QNameString(context.LocalName, context.Namespace)); 960if (context.ElementDecl != null) 962if (context.ElementDecl.Datatype == null) 1073laxis.Ks[laxis.Column] = new TypedObject(reader.TypedValueObject, stringValue, context.ElementDecl.Datatype);