System.Xml.Schema.SchemaCollectionCompiler.CheckParticleDerivation C# (CSharp) Méthode

CheckParticleDerivation() private méthode

private CheckParticleDerivation ( XmlSchemaComplexType complexType ) : void
complexType XmlSchemaComplexType
Résultat void
        private void CheckParticleDerivation(XmlSchemaComplexType complexType) {
            XmlSchemaComplexType baseType = complexType.BaseXmlSchemaType as XmlSchemaComplexType;
            if (baseType != null && baseType != XmlSchemaComplexType.AnyType && complexType.DerivedBy == XmlSchemaDerivationMethod.Restriction) {
                if (!IsValidRestriction(complexType.ContentTypeParticle, baseType.ContentTypeParticle)) {
#if DEBUG
                    if(complexType.ContentTypeParticle != null && baseType.ContentTypeParticle != null) {
                        string position = string.Empty;
                        if (complexType.SourceUri != null) {
                            position = " in " + complexType.SourceUri + "(" + complexType.LineNumber + ", " + complexType.LinePosition + ")";
                        }
                        Debug.WriteLineIf(DiagnosticsSwitches.XmlSchema.TraceError, "Invalid complexType content restriction" + position);
                        Debug.WriteLineIf(DiagnosticsSwitches.XmlSchema.TraceError, "     Base    " + DumpContentModel(baseType.ContentTypeParticle));
                        Debug.WriteLineIf(DiagnosticsSwitches.XmlSchema.TraceError, "     Derived " + DumpContentModel(complexType.ContentTypeParticle));
                    }
#endif
                    SendValidationEvent(Res.Sch_InvalidParticleRestriction, complexType);
                }
            }
        }