System.Xml.Schema.XmlSchemaValidator.CheckRequiredAttributes C# (CSharp) Méthode

CheckRequiredAttributes() private méthode

private CheckRequiredAttributes ( SchemaElementDecl currentElementDecl ) : void
currentElementDecl SchemaElementDecl
Résultat void
        private void CheckRequiredAttributes(SchemaElementDecl currentElementDecl)
        {
            Debug.Assert(currentElementDecl != null);
            Dictionary<XmlQualifiedName, SchemaAttDef> attributeDefs = currentElementDecl.AttDefs;
            foreach (SchemaAttDef attdef in attributeDefs.Values)
            {
                if (_attPresence[attdef.Name] == null)
                {
                    if (attdef.Presence == SchemaDeclBase.Use.Required || attdef.Presence == SchemaDeclBase.Use.RequiredFixed)
                    {
                        SendValidationEvent(SR.Sch_MissRequiredAttribute, attdef.Name.ToString());
                    }
                }
            }
        }