public static AttributeMap[] Create(TypeModel model, MemberInfo member, bool inherit)
{
#if FEAT_IKVM
System.Collections.Generic.IList<CustomAttributeData> all = member.__GetCustomAttributes(model.MapType(typeof(Attribute)), inherit);
AttributeMap[] result = new AttributeMap[all.Count];
int index = 0;
foreach (CustomAttributeData attrib in all)
{
result[index++] = new AttributeDataMap(attrib);
}
return result;
#else
#if WINRT
Attribute[] all = System.Linq.Enumerable.ToArray(member.GetCustomAttributes(inherit));
#else
var all = member.GetCustomAttributes(inherit);
#endif
var result = new AttributeMap[all.Length];
for (var i = 0; i < all.Length; i++)
{
result[i] = new ReflectionAttributeMap((Attribute) all[i]);
}
return result;
#endif
}