如何在.NET 3.0中使用加载项框架?

时间:2023-01-19 23:53:20

There are some updates with .NET 3.0 concerning how to create and use add-ins for your own applications. I read about some "pipeline" you have to create for the communication between add-in and host-application but couldn't find further information about it.

.NET 3.0有一些更新,涉及如何为自己的应用程序创建和使用加载项。我读到了为加载项和主机应用程序之间的通信而必须创建的一些“管道”,但无法找到有关它的更多信息。

How would you made an add-in functionality in an application with .NET 3.0/3.5?

如何在.NET 3.0 / 3.5的应用程序中创建一个加载项功能?

Additional information if necessary: The host application is made with WPF and some general functionality. Each add-in should add a own register-tab to a given container with their own content (buttons, textfields, ...) and methods to extend the host-application.

必要时的附加信息:主机应用程序使用WPF和一些常规功能。每个加载项都应该为给定容器添加一个自己的register-tab,其中包含自己的内容(按钮,文本字段,...)和扩展主机应用程序的方法。

3 个解决方案

#1


1  

Definitely check out the Managed Extensibility Framework at www.codeplex.com/mef. It's a framework that helps with creating extensible applications. It takes care of all the plumbing when creating a pluggable app. I'm currently writing a series of articles that show the basic functionality of mef at http://www.jenswinter.com/?tag=/mef. But the articles are in German though.

请访问www.codeplex.com/mef,查看Managed Extensibility Framework。它是一个有助于创建可扩展应用程序的框架。在创建可插拔应用程序时,它会处理所有管道。我目前正在撰写一系列文章,在http://www.jenswinter.com/?tag=/mef上展示mef的基本功能。但这些文章都是德文的。

Another framework you should give a try is the CompositeWpf (f.k.a. Prism). It let's you create composite WPF applications. Your app will consist of a shell app and several module projects that are wired together and hooked into the shell.

你应该尝试的另一个框架是CompositeWpf(f.k.a。Prism)。它让你创建复合WPF应用程序。您的应用程序将包含一个shell应用程序和几个连接在一起并挂钩到shell中的模块项目。

#2


2  

In addition to Daniels codeplex link, Jason He also has a nice wee series on using the System.AddIn namespace when developing Paint.NET starting here -

除了Daniels codeplex链接之外,Jason He还有一个很好的系列关于在从这里开始开发Paint.NET时使用System.AddIn命名空间 -

http://blogs.msdn.com/zifengh/archive/2007/01/04/addin-model-in-paint-net-1-introduction.aspx

#3


1  

There is also available now the Managed Extensibility Framework (www.codeplex.com/mef) which allows you to leverage a rich plugin platform.

现在还提供Managed Extensibility Framework(www.codeplex.com/mef),它允许您利用丰富的插件平台。

You may also find that dependency injection is along the lines of something you could use (Unity, StructureMap to name just two).

您可能还会发现依赖注入是您可以使用的东西(Unity,StructureMap仅举两个例子)。

You could create a plugin platform on top of a dependency injection framework, though a dedicated plugin platform like MEF will likely be easier to implement.

您可以在依赖注入框架之上创建一个插件平台,尽管像MEF这样的专用插件平台可能更容易实现。

#1


1  

Definitely check out the Managed Extensibility Framework at www.codeplex.com/mef. It's a framework that helps with creating extensible applications. It takes care of all the plumbing when creating a pluggable app. I'm currently writing a series of articles that show the basic functionality of mef at http://www.jenswinter.com/?tag=/mef. But the articles are in German though.

请访问www.codeplex.com/mef,查看Managed Extensibility Framework。它是一个有助于创建可扩展应用程序的框架。在创建可插拔应用程序时,它会处理所有管道。我目前正在撰写一系列文章,在http://www.jenswinter.com/?tag=/mef上展示mef的基本功能。但这些文章都是德文的。

Another framework you should give a try is the CompositeWpf (f.k.a. Prism). It let's you create composite WPF applications. Your app will consist of a shell app and several module projects that are wired together and hooked into the shell.

你应该尝试的另一个框架是CompositeWpf(f.k.a。Prism)。它让你创建复合WPF应用程序。您的应用程序将包含一个shell应用程序和几个连接在一起并挂钩到shell中的模块项目。

#2


2  

In addition to Daniels codeplex link, Jason He also has a nice wee series on using the System.AddIn namespace when developing Paint.NET starting here -

除了Daniels codeplex链接之外,Jason He还有一个很好的系列关于在从这里开始开发Paint.NET时使用System.AddIn命名空间 -

http://blogs.msdn.com/zifengh/archive/2007/01/04/addin-model-in-paint-net-1-introduction.aspx

#3


1  

There is also available now the Managed Extensibility Framework (www.codeplex.com/mef) which allows you to leverage a rich plugin platform.

现在还提供Managed Extensibility Framework(www.codeplex.com/mef),它允许您利用丰富的插件平台。

You may also find that dependency injection is along the lines of something you could use (Unity, StructureMap to name just two).

您可能还会发现依赖注入是您可以使用的东西(Unity,StructureMap仅举两个例子)。

You could create a plugin platform on top of a dependency injection framework, though a dedicated plugin platform like MEF will likely be easier to implement.

您可以在依赖注入框架之上创建一个插件平台,尽管像MEF这样的专用插件平台可能更容易实现。