stef wrote:
Thanks Otis,
A couple of unit tests later and I can't create an abstract class from an external assembly using new but I can using the GeneralEntityFactory, e.g.
CampaignEntity campaign = GeneralEntityFactory.Create(EntityType.CampaignEntity) as CampaignEntity;
Since it's only the constructors that are marked as internal, using the factory provides a fully useable class instance outside the assembly.
Should the abstract classes be available through the factory?
The runtime uses the factory to create an instance of the entity which is marked as abstract, to be able to produce hierarchical queries, however that's code in the runtime code. I couldn't find a way to really stop it or work around it and generate the entity class(es) as 'abstract' instead of normal classes with an internal constructor.
I'll do some more investigation in this matter to see how I can avoid public instances.