System.Xml.Schema.XmlSchemaInference.FindAttribute C# (CSharp) Method

FindAttribute() private method

private FindAttribute ( ICollection attributes, string attrName ) : XmlSchemaAttribute
attributes ICollection
attrName string
return XmlSchemaAttribute
            internal XmlSchemaAttribute FindAttribute(ICollection attributes, string attrName)
            {
                foreach(XmlSchemaObject xsa in attributes)
                {
                    XmlSchemaAttribute schemaAttribute = xsa as XmlSchemaAttribute;
                    if (schemaAttribute != null)
                    {
                        if (schemaAttribute.Name == attrName)
                        {
                            return schemaAttribute;
                        }

                    }
                }
                return null;
            }