Hi Albert.
I'm not sure I understand how module constructors would
address the issue, given that they are supported only at
the CLR level, but not at the CLI level (e.g., I can't write
one in C#, or am I mistaken about that?).
Regarding IExtensionApplication. Sorry if this seems like
20/20 hindsight, but my opinion is that you should either
support multiple implementations of that interface, or
any case where an assembly is found to contain multiple
implementations, should be treated as an error.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Albert Szilvasy" wrote in message news:4948798@discussion.autodesk.com...
Frankly, I haven't thought about this. What do these assembly combining
tools do about module constructors? These are new to .net 2.0 and get called
when a module is loaded. If module constructors were available in .net 1.1
we wouldn't have the IExtensionApplication stuff at all.
Albert
"Tony Tanzillo" wrote in message
news:4948711@discussion.autodesk.com...
Was there any thought given to supporting multiple
IExtensionApplication implementations in a single
assembly, the interop?
I can clearly see good reasons why I would want to
have them. If I take code and put it in a separate
assembly that is referenced from another, each can
get control when it is loaded, by way of the fact that
AutoCAD processes assemblies from the AppDomain's
OnAssemblyLoad() handler, and treats the primary
and referenced assemblies with indifference, so each
can have its own IExtensionApplication implementation
that gets called on load/unload.
But, if I move code from several assemblies into a
single one, I have to make changes, because there
can be only a single entry point for each assembly.
I don't think I like that at all.
You might want to be wary of this, given that there
is a tool from MS that allows you to combine multiple
assemblies into a single one, and I would imagine that
given several assemblies with an implementation of IExtensionApplication,
something will break if you were
to merge them into a single assembly.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com