System.Xml.Schema.ParticleContentValidator.CloseGroup C# (CSharp) Method

CloseGroup() public method

public CloseGroup ( ) : void
return void
        public void CloseGroup() {
            SyntaxTreeNode node = (SyntaxTreeNode)stack.Pop();
            if (node == null) {
                return;
            }
            if (stack.Count == 0) {
                contentNode = node;
                isPartial = false;
            }
            else {
                // some collapsing to do...
                InteriorNode inNode = (InteriorNode)stack.Pop();
                if (inNode != null) {
                    inNode.RightChild = node;
                    node = inNode;
                    isPartial = true;
                }
                else {
                    isPartial = false;
                }
                stack.Push(node);
            }
        }
        

Usage Example

 private static XmlSchemaComplexType CreateAnyType(XmlSchemaContentProcessing processContents)
 {
     XmlSchemaComplexType type = new XmlSchemaComplexType();
     type.SetQualifiedName(DatatypeImplementation.QnAnyType);
     XmlSchemaAny item = new XmlSchemaAny {
         MinOccurs = 0M,
         MaxOccurs = 79228162514264337593543950335M,
         ProcessContents = processContents
     };
     item.BuildNamespaceList(null);
     XmlSchemaSequence sequence = new XmlSchemaSequence();
     sequence.Items.Add(item);
     type.SetContentTypeParticle(sequence);
     type.SetContentType(XmlSchemaContentType.Mixed);
     type.ElementDecl = SchemaElementDecl.CreateAnyTypeElementDecl();
     type.ElementDecl.SchemaType = type;
     ParticleContentValidator validator = new ParticleContentValidator(XmlSchemaContentType.Mixed);
     validator.Start();
     validator.OpenGroup();
     validator.AddNamespaceList(item.NamespaceList, item);
     validator.AddStar();
     validator.CloseGroup();
     ContentValidator validator2 = validator.Finish(true);
     type.ElementDecl.ContentValidator = validator2;
     XmlSchemaAnyAttribute attribute = new XmlSchemaAnyAttribute {
         ProcessContents = processContents
     };
     attribute.BuildNamespaceList(null);
     type.SetAttributeWildcard(attribute);
     type.ElementDecl.AnyAttribute = attribute;
     return type;
 }
All Usage Examples Of System.Xml.Schema.ParticleContentValidator::CloseGroup