BExIS.Xml.Helpers.Mapping.XmlSchemaManager.HasAttributes C# (CSharp) Метод

HasAttributes() публичный Метод

returns true if the xmlnode has attributes
public HasAttributes ( XmlNode node ) : bool
node System.Xml.XmlNode
Результат bool
        public bool HasAttributes(XmlNode node)
        {
            XmlSchemaElement element = Elements.Where(e => e.Name.Equals(node.LocalName)).FirstOrDefault();
            if (element != null)
            {
                XmlSchemaComplexType type = element.ElementSchemaType as XmlSchemaComplexType;

                if (type != null)
                {
                    // If the complex type has any attributes, get an enumerator
                    // and write each attribute name to the Debug.
                    if (type.AttributeUses.Count > 0)
                    {
                        return true;
                    }
                }
            }

            return false;
        }