Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Users and password
Message
De
06/01/2005 20:58:51
Max Fillmore
Essential Skills, Inc.
Lenexa, Kansas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP1
Network:
Novell 4.x
Database:
MS SQL Server
Divers
Thread ID:
00974022
Message ID:
00974934
Vues:
22
Hi Kevin,

I tried overriding the mmFactory. In my case I created a Role object which was a subclass of my ABusinessObject class. I made a choice that it was better for me to copy some of your code from mmRole and modify it (fairly stable code) than to copy the members in ABusinessObject (which are likely to require maintenance everytime a new version of MM.Net is released.) Unfortunately this made my class a cousin of mmRole rather than a descendant. When I went to override CreateRoleObject() in my Factory override the IDE told me that the return type was invalid.

Is there a "factory" way around this? I like the factory concept but think it would be more generic and flexible if methods in the factory could return objects which are not decendants of the original return type.

Thanks,
Max...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform