Tnx
couple of problems with this architecture:
Following:
interface IInterface1
{}
interface IInterface2: Interface1
{}
class MayClass:IInterface2
{}
While doing enumeration thow dlls (public and non abstract) we check for
type of IInterface1 so
Type typeInterface = myType.GetInterface("BaseNamespace.IInterface1", true);
returns some type (IInterface1). go on:
MyPlugin.Instance =
(IInterface1)Activator.CreateInstance(pluginAssemb ly.GetType(pluginType.ToString()));
//
returns error Can not cast. Wich means that class(MyClass inherited from
Interface2, wich inherited from interface1 and not be cased to interface1)
Please advice, it looks stupid that class inh from base interface can not be
cased to it.
TNX
--
Tamir Khason
You want dot.NET? Just ask:
"Please,
www.dotnet.us "
"Jonathan Yong" <da*******@someplace.com> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
Try this two articles:
http://www.codeproject.com/csharp/PluginsInCSharp.asp
http://www.codeproject.com/csharp/plugins.asp
Tamir Khason wrote: Friends, maybe someone knows good references for .NET plugin based
program architecture. E.g I want to be able to "put" class library(dll)
in some place (where I do not the name of the class, but only structure
[maybe abstract???]) and use it "plug-and-play" in main procedure without
recompilation