internal SchemaType(XmlSchemaType type) { schemaType = type; IsComplex = false; DerivedByRestriction = false; thisComplexType = null; thisSchemaAttributes = new List <ISchemaAttribute>(); if (schemaType is XmlSchemaComplexType) { IsComplex = true; thisComplexType = schemaType as XmlSchemaComplexType; if (this.thisComplexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) { DerivedByRestriction = true; } thisSchemaAttributes.Capacity = thisComplexType.AttributeUses.Count; foreach (System.Collections.DictionaryEntry currentEntry in thisComplexType.AttributeUses) { var newAttribute = new SchemaAttribute(currentEntry.Value as XmlSchemaAttribute); thisSchemaAttributes.Add(newAttribute); } } thisQualifiedName = null; thisBaseSchemaType = null; }
private void InitializeFromComplexType() { IsComplex = true; thisComplexType = schemaType as XmlSchemaComplexType; if (this.thisComplexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) { DerivedByRestriction = true; } thisSchemaAttributes.Capacity = thisComplexType.AttributeUses.Count; foreach (System.Collections.DictionaryEntry currentEntry in thisComplexType.AttributeUses) { var newAttribute = new SchemaAttribute(currentEntry.Value as XmlSchemaAttribute); thisSchemaAttributes.Add(newAttribute); } InitializeFromRestrictionAttributes(); }