List of EntityBase-subclasses

Vote:
 

Hi!

Is there perhaps any way to retrieve a collection of types that extends EntityBase?

The reason I ask is that I would like to do something everytime an Entity (an object that extends StarCommunityEntityBase) is removed. Is this possible?  

#22826
Aug 18, 2008 14:09
Vote:
 

You can use reflection to find all types compatible with IStarCommunityEntity in the current application domain, that is a relatively simple task. I am unsure what you plan when you got the list of Types, though. Could you elaborate?

 /K

#22865
Aug 19, 2008 14:57
Vote:
 

I was planning to use each type to find it's entityprovider and listen to it's entityremoved-event, which I assumed was there. However, it seems I was wrong in assuming so, and was actually thinking about the event with that name in StarCommunityFactoryBase :)

Do you have any suggestions on how I could create something that makes it so a method of mine is run each time a entity is removed?

One idea would be to use reflection to find all classes that extends StarCommunityFactoryBase and listen to their EntityRemoved-events. But that relies on that all entities are removed by subclasses of  StarCommunityFactoryBase :(

#22894
Edited, Aug 20, 2008 9:52
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.