But the beauty of COM monikers was that the plumbing was supplied by the COM infrastructure the call GetObject was handled internally until the ParseDisplayName so I didn't have to know any types to receive an interface (just a clsid) - with the class factory approach I have to code against a known factory.
For what it's worth what I'm trying to do is allow the user to specify a delivery agent (something capable of transfering data from point to point, email, FTP, http etc) so in an XML file/database they're allowed to have something like <AGENT>FTP</AGENT> or <AGENT>EMAIL</AGENT> (a little bit more complicated than this but in the COM world this was a moniker string) we simply passed this string to getobject and we had a delivery agent. now in .Net we can't do it that way anymore so we have a class factory that maps the names of agents to assembly and classes within the assembly. Is this to best solution. Regards Robert Rolls. -----Original Message----- From: Chris Sells [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 7 May 2002 1:52 To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Anybody Monikers? At a high level, monikers were really just a way to turn a string that uniquely identifies an object into the object itself, e.g. a serialized object, an object in a shared table, etc. What made it complicated with its use in OLE. Without that, a simple factory/fetch function will do the job nicely. Chris ----- Original Message ----- From: "Rolls, Robert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 05, 2002 11:54 PM Subject: [DOTNET] Anybody Monikers? > Is anybody coming up with a similar principle in .Net! I'd love to get an > object by name presently I've got a class that has a GetThing method takes a > name and maps the name to an entry in an XML file which contains the > assembly and class to create. > > Anything nicer going around? > > > Regards, > Robert Rolls You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. **********************************************************************" This correspondence is for the named person's use only. It may contain confidential or legally privileged information or both. " No confidentiality or privilege is waived or lost by any " mistransmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or rely on any part of this correspondence if you are not the intended recipient. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views of Vodafone. This email has been checked for viruses. ********************************************************************************************** You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.