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

CompileContentTypeParticle() private méthode

private CompileContentTypeParticle ( XmlSchemaParticle particle, bool substitution ) : XmlSchemaParticle
particle XmlSchemaParticle
substitution bool
Résultat XmlSchemaParticle
        private XmlSchemaParticle CompileContentTypeParticle(XmlSchemaParticle particle, bool substitution) {
            XmlSchemaParticle ctp = CannonicalizeParticle(particle, true, substitution);
            XmlSchemaChoice choice = ctp as XmlSchemaChoice;
            if (choice != null && choice.Items.Count == 0) {
                if (choice.MinOccurs != decimal.Zero) {
                    SendValidationEvent(Res.Sch_EmptyChoice, choice, XmlSeverityType.Warning);
                }
                return XmlSchemaParticle.Empty;
            }
            return ctp;
        }