private void ReflectGetExtenders(Type classToReflect) {
foreach(Attribute attr in DebugTypeDescriptor.GetAttributes(classToReflect)) {
if (attr is ProvidePropertyAttribute) {
ProvidePropertyAttribute provided = (ProvidePropertyAttribute)attr;
Type receiverType = Type.GetType(provided.ReceiverTypeName);
if (receiverType != null) {
MethodInfo getMethod = classToReflect.GetMethod("Get" + provided.PropertyName, new Type[] {receiverType});
if (getMethod != null && !getMethod.IsStatic && getMethod.IsPublic) {
MethodInfo setMethod = classToReflect.GetMethod("Set" + provided.PropertyName, new Type[] {receiverType, getMethod.ReturnType});
if (setMethod != null && (setMethod.IsStatic || !setMethod.IsPublic)) {
setMethod = null;
}
AddMember(new DebugReflectPropertyDescriptor(classToReflect, provided.PropertyName, getMethod.ReturnType, receiverType, getMethod, setMethod, null));
}
}
}
}
}