System.Xml.Schema.XmlSchemaObjectTable.Clear C# (CSharp) Method

Clear() private method

private Clear ( ) : void
return void
        internal void Clear() {
            table.Clear();
            entries.Clear();
        }

Usage Example

Example #1
0
        private void ValidateUPAOnItems(XmlSchemaObjectTable qnames, ArrayList nsNames, ValidationEventHandler h, XmlSchema schema)
        {
            XmlSchemaObjectTable xmlSchemaObjectTable  = new XmlSchemaObjectTable();
            ArrayList            arrayList             = new ArrayList();
            XmlSchemaObjectTable xmlSchemaObjectTable2 = new XmlSchemaObjectTable();
            ArrayList            arrayList2            = new ArrayList();

            for (int i = 0; i < this.Items.Count; i++)
            {
                XmlSchemaParticle xmlSchemaParticle = this.Items[i] as XmlSchemaParticle;
                xmlSchemaParticle.ValidateUniqueParticleAttribution(xmlSchemaObjectTable, arrayList, h, schema);
                if (xmlSchemaParticle.ValidatedMinOccurs == xmlSchemaParticle.ValidatedMaxOccurs)
                {
                    xmlSchemaObjectTable.Clear();
                    arrayList.Clear();
                }
                else
                {
                    if (xmlSchemaParticle.ValidatedMinOccurs != 0m)
                    {
                        foreach (object obj in xmlSchemaObjectTable2.Names)
                        {
                            XmlQualifiedName name = (XmlQualifiedName)obj;
                            xmlSchemaObjectTable.Set(name, null);
                        }
                        foreach (object obj2 in arrayList2)
                        {
                            arrayList.Remove(obj2);
                        }
                    }
                    foreach (object obj3 in xmlSchemaObjectTable.Names)
                    {
                        XmlQualifiedName name2 = (XmlQualifiedName)obj3;
                        xmlSchemaObjectTable2.Set(name2, xmlSchemaObjectTable[name2]);
                    }
                    arrayList2.Clear();
                    arrayList2.AddRange(arrayList);
                }
            }
        }
All Usage Examples Of System.Xml.Schema.XmlSchemaObjectTable::Clear