public ConfigurationAttribute GetAttribute(string attributeName)
{
if (this.Schema != null && !this.Schema.AllowUnrecognizedAttributes
&& this.Schema.AttributeSchemas.All(schema => schema.Name != attributeName))
{
throw new COMException(
string.Format(
"Filename: \\\\?\\{0}\r\nLine number: {1}\r\nError: Unrecognized attribute '{2}'\r\n\r\n",
this.FileContext.FileName,
(this.Entity as IXmlLineInfo).LineNumber,
attributeName));
}
return Attributes[attributeName];
}