public virtual void FilterMembers(Type infoType, IList infos, Attribute[] attributes) {
if (attributes != null && attributes.Length > 0 && infos.Count > 0) {
switch (attributes.Length) {
case 1: {
Attribute filterAttribute = attributes[0];
for (int i=infos.Count - 1; i>=0; i--) {
if (ShouldHideMember((MemberDescriptor)infos[i],filterAttribute)) {
infos.RemoveAt(i);
}
}
break;
}
case 2: {
Attribute filterAttribute1 = attributes[0];
Attribute filterAttribute2 = attributes[1];
for (int i=infos.Count - 1; i>=0; i--) {
if (ShouldHideMember((MemberDescriptor)infos[i], filterAttribute1) ||
ShouldHideMember((MemberDescriptor)infos[i], filterAttribute2)) {
infos.RemoveAt(i);
}
}
break;
}
default:
for (int i=infos.Count - 1; i>=0; i--) {
for (int j = 0; j < attributes.Length; j++) {
if (ShouldHideMember((MemberDescriptor)infos[i], attributes[j])) {
infos.RemoveAt(i);
break;
}
}
}
break;
}
}
}