Prev: Exception in thread
Next: ThreadPool and WaitHandle
From: Arne Vajhøj on 12 May 2010 17:06 On 12-05-2010 16:51, Mr. X. wrote: > "Arne Vajhøj" <arne(a)vajhoej.dk> wrote in message > news:4beb0bcc$0$274$14726298(a)news.sunsite.dk... >> On 12-05-2010 16:06, Mr. X. wrote: >>> "Arne Vajhøj" <arne(a)vajhoej.dk> wrote in message >>> news:4beb07d2$0$280$14726298(a)news.sunsite.dk... >>>> On 12-05-2010 15:20, Mr. X. wrote: >>>>> How can I make plugin object in C# ? >>>> >>>> .NET has excellent possibilities for creating plugins. From >>>> simple load of class and instantiation via reflection over >>>> use og IoC framework like Spring.NET and a config file to >>>> the huge add-in framework. >> > Give me an example, please. >> >> IPlugin plugin = >> (IPlugin)Assembly.Load(pluginassemblyname).CreateInstance(pluginclassname); >> >> plugin.SomeMethod(); > C# is on VS 2008. > I cannot compile this code. > Where is IPlugin. > I did : using PlugIn; > but it cannot be compiled. IPlugin is the interface that all you plugins implements. Arne
From: Helmut Woess on 13 May 2010 00:13
Am Wed, 12 May 2010 23:51:17 +0300 schrieb Mr. X.: > C# is on VS 2008. > I cannot compile this code. > Where is IPlugin. > I did : using PlugIn; > but it cannot be compiled. > > "Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message > news:4beb0bcc$0$274$14726298(a)news.sunsite.dk... >> On 12-05-2010 16:06, Mr. X. wrote: >>> "Arne Vajh�j" <arne(a)vajhoej.dk> wrote in message >>> news:4beb07d2$0$280$14726298(a)news.sunsite.dk... >>>> On 12-05-2010 15:20, Mr. X. wrote: >>>>> How can I make plugin object in C# ? >>>> >>>> .NET has excellent possibilities for creating plugins. From >>>> simple load of class and instantiation via reflection over >>>> use og IoC framework like Spring.NET and a config file to >>>> the huge add-in framework. >>> Give me an example, please. >> >> IPlugin plugin = >> (IPlugin)Assembly.Load(pluginassemblyname).CreateInstance(pluginclassname); >> plugin.SomeMethod(); >> >> Arne >> >> Here is a complete project, maybe this helps: http://www.codeproject.com/KB/cs/c__plugin_architecture.aspx bye, Helmut |