R
RichS
Further to this. If you want to create a common Plugin environment it
is nearly impossible to use Classes. Take the following example:
In the Framework model you create a common Plugin base class, then in
each Plugin project you want to use that class. Because of the C#
compiler, even though it is the same class [ from the same file etc...
], because it was compiled in two different projects, the CLR treats
the classes as different types. Hence you cannot cast between the 2
different projects. The only way to do this is to create a common
interface, and that is the same across the 2 different projects so you
can cast.
This is especially important if you want to do something like this:
iPluginFile = Activator.CreateInstance( _assemblyType ) as IPluginFile;
Rich.
is nearly impossible to use Classes. Take the following example:
In the Framework model you create a common Plugin base class, then in
each Plugin project you want to use that class. Because of the C#
compiler, even though it is the same class [ from the same file etc...
], because it was compiled in two different projects, the CLR treats
the classes as different types. Hence you cannot cast between the 2
different projects. The only way to do this is to create a common
interface, and that is the same across the 2 different projects so you
can cast.
This is especially important if you want to do something like this:
iPluginFile = Activator.CreateInstance( _assemblyType ) as IPluginFile;
Rich.