All properties of XPObject descendant class which are foreign keys pointing to another XPObject entities are easily available under ObjectProperties property. I have manually added a custom property to my class which type is a XPObject child and marked it as [NonPersistent].
Now I am writing some generic code and would like to iterate through all properties of type being a XPObject child - no matter if they are persistent or not. Is the Members property (property filtered) the only option?
I am not very happy with that approach, I expect much filtering and casting to get what I need.
I have implemented my requirement using
Membersproperty. The aim is to do some formatting actions forGridViewcolumns if property type is aXPObjectdescendant implementingIMyInterface. The code looks as follows:It seems to work fine. Anyway I'd be really happy to see a more straightforward approach.