Added __GetCustomAttributes() overloads for Assembly and Module for ease of use and consistency.

This commit is contained in:
jfrijters 2010-05-20 09:32:04 +00:00
Родитель 4f4f667aa8
Коммит c08cca1a9a
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -1,5 +1,5 @@
/*
Copyright (C) 2009 Jeroen Frijters
Copyright (C) 2009-2010 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -434,6 +434,16 @@ namespace IKVM.Reflection
return parameter.GetCustomAttributesData(null);
}
public static IList<CustomAttributeData> __GetCustomAttributes(Assembly assembly, Type attributeType, bool inherit)
{
return assembly.GetCustomAttributesData(attributeType);
}
public static IList<CustomAttributeData> __GetCustomAttributes(Module module, Type attributeType, bool inherit)
{
return module.GetCustomAttributesData(attributeType);
}
public static IList<CustomAttributeData> __GetCustomAttributes(ParameterInfo parameter, Type attributeType, bool inherit)
{
List<CustomAttributeData> list = new List<CustomAttributeData>();