System.Xml.Schema.XmlSchemaComplexType.HasAttributeQNameRef C# (CSharp) Méthode

HasAttributeQNameRef() static private méthode

static private HasAttributeQNameRef ( XmlSchemaObjectCollection attributes ) : bool
attributes XmlSchemaObjectCollection
Résultat bool
        internal static bool HasAttributeQNameRef(XmlSchemaObjectCollection attributes) {
            foreach (XmlSchemaObject xso in attributes) {
                if (xso is XmlSchemaAttributeGroupRef) {
                    return true;
                }
                else {
                    XmlSchemaAttribute attribute = xso as XmlSchemaAttribute;
                    if (!attribute.RefName.IsEmpty || !attribute.SchemaTypeName.IsEmpty) {
                        return true;
                    }
                }
            }
            return false;
        }
    }

Usage Example

        internal override XmlSchemaObject Clone()
        {
            XmlSchemaAttributeGroup group = (XmlSchemaAttributeGroup)base.MemberwiseClone();

            if (XmlSchemaComplexType.HasAttributeQNameRef(this.attributes))
            {
                group.attributes    = XmlSchemaComplexType.CloneAttributes(this.attributes);
                group.attributeUses = null;
            }
            return(group);
        }
All Usage Examples Of System.Xml.Schema.XmlSchemaComplexType::HasAttributeQNameRef