在我的应用程序中创建ASP.NET插件 [英] Create ASP.NET plugins in my Application

查看:81
本文介绍了在我的应用程序中创建ASP.NET插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在尝试创建一个具有应加载模块配置的应用程序.为此,我有一个主题引擎,可以由客户端配置要加载哪些模块以及加载位置的主题引擎.

该模块可以由公司中的任何其他团队开发,每次我们有新版本的插件时,或者任何时候我们想要开发新插件时,我们都不想发送源代码.

如何创建插件并使用该插件开发网站.

有什么解决办法吗?

请告诉我从哪里开始的想法?

问候
Avani Raval

Hello,

I''m trying to create an application that has configuration about the modules that should be loaded. For that I have a Theme engine that can be configured by the client with what modules what to load and where to load.

This modules can be developed by any other team in the company and each time we have a new version of the plugin or anytime we want to to develop a new plugin we don''t want to send the source code.

How to create plugin and develop a web site using that plugin.

Any solution for this?

Please give me idea from where i have to start?

Regards
Avani Raval

推荐答案

由于它是一个基于插件的系统,因此需要首先定义一个所有插件都将遵循的基本接口.只有您可以执行此操作,因为您可以访问自己的要求,但是我可能将其编码为:
As it''s a plugin based system, you need to start by defining a base interface that all your plugins will conform to. Only you can do this because you have access to your requirements, but I might code one as:
public interface IPlugin
{
  string Name { set; get; }
  void Initialize();
  void Run();
}

然后您可以使用诸如Managed Extensibility Framework(MEF)之类的内容根据某些条件自动加载插件,例如它们都位于插件目录中.

You could then use something like the Managed Extensibility Framework (MEF) to automatically load the plugins based on some criteria, e.g. they all sit inside a Plugins directory.


fdsafdsafdsafds :) dsafdsa:laugh:fdsafdsa:(
fdsafdsafdsafds :) dsafdsa :laugh: fdsafdsa :(


这篇关于在我的应用程序中创建ASP.NET插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆