System.Xml.Xsl.XsltOld.RecordBuilder.FindAttribute C# (CSharp) Method

FindAttribute() private method

private FindAttribute ( string name, string nspace, string &prefix ) : int
name string
nspace string
prefix string
return int
        private int FindAttribute(string name, string nspace, ref string prefix) {
            Debug.Assert(this.attributeCount <= this.attributeList.Count);

            for (int attrib = 0; attrib < this.attributeCount; attrib ++) {
                Debug.Assert(this.attributeList[attrib] != null && this.attributeList[attrib] is BuilderInfo);

                BuilderInfo attribute = (BuilderInfo) this.attributeList[attrib];

                if (Keywords.Equals(attribute.LocalName, name)) {
                    if (Keywords.Equals(attribute.NamespaceURI, nspace)) {
                        return attrib;
                    }
                    if (Keywords.Equals(attribute.Prefix, prefix)) {
                        // prefix conflict. Should be renamed.
                        prefix = string.Empty;
                    }
                }

            }

            return -1;
        }