المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Is there a way to registry factories when an assembly is loaded?



C# Programming
09-10-2009, 10:27 PM
I would like to implement factory methods to transfer data between the gui controls and my dataobjects. The gui controls can be ASP.NET web controls or Windows controls and I have a utility library for each environment. The dataobjects can run in either environment and should know nothing about which it is in.

So what I would like to happen is that when the Web utility library is loaded the webguido bridges are registered and when the Windows utility library is loaded the winguido bridges are registered. That way the dataobjects can send/receive data from the gui without knowing which gui it is.

It seems like such a basic requirements for factories. Is there a way to do this?