public virtual Type GetSupertypingAdapter(Type type, Type subtype)
{
object[] attrs =
GetCustomAttributes(type, typeof(SupertypingAdapterAttribute));
if (attrs == null)
return null;
foreach (SupertypingAdapterAttribute attr in attrs) {
if (attr.AdapteeType == subtype)
return attr.AdapterType;
}
return null;
}