public void ReadAttributes()
{
#if STATIC
if (assembly.__IsMissing)
return;
#endif
IList<CustomAttributeData> attrs = CustomAttributeData.GetCustomAttributes (assembly);
string ns, name;
foreach (var a in attrs) {
importer.GetCustomAttributeTypeName (a, out ns, out name);
if (name == "CLSCompliantAttribute") {
if (ns == "System") {
try {
cls_compliant = (bool) a.ConstructorArguments[0].Value;
} catch {
}
}
continue;
}
if (name == "InternalsVisibleToAttribute") {
if (ns != MetadataImporter.CompilerServicesNamespace)
continue;
string s;
try {
s = a.ConstructorArguments[0].Value as string;
} catch {
s = null;
}
if (s == null)
continue;
var an = new AssemblyName (s);
if (internals_visible_to == null)
internals_visible_to = new List<AssemblyName> ();
internals_visible_to.Add (an);
continue;
}
if (name == "ExtensionAttribute") {
if (ns == MetadataImporter.CompilerServicesNamespace)
contains_extension_methods = true;
continue;
}
}
}