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

FindAttributeRef() private method

private FindAttributeRef ( ICollection attributes, string attributeName, string nsURI ) : XmlSchemaAttribute
attributes ICollection
attributeName string
nsURI string
return XmlSchemaAttribute
            internal XmlSchemaAttribute FindAttributeRef(ICollection attributes, string attributeName, string nsURI)
            {
                foreach(XmlSchemaObject xsa in attributes)
                {
                    XmlSchemaAttribute schemaAttribute = xsa as XmlSchemaAttribute;
                    if (schemaAttribute != null)
                    {
                        if (schemaAttribute.RefName.Name == attributeName && schemaAttribute.RefName.Namespace == nsURI) {
                            return schemaAttribute;
                        }
                        
                    }
                }
                return null;
            }