我正在开发一个项目,其中我使用外部开源库来管理表单身份验证用户在我的SharePoint Web应用程序( http://sharepoint2010fba.codeplex.com/ )上的角色。
所有功能(例如,创建新角色,用户等)都被编码到aspx代码隐藏事件中。 现在我需要扩展这些方法以添加更多功能。
如上所述,在场景中扩展功能的最佳设计方法是什么?
谢谢,沙拉斯
I am working on a project wherein I am using a external open-source library for managing roles of forms authenticated users on my SharePoint web application (http://sharepoint2010fba.codeplex.com/).
All the functionality (for e.g. creating new roles, users etc.) are coded in to the aspx code-behind events. Now I need to extend these methods to add more functionality.
What would be the best design approach to extend the functionality in the scenario as above?
Thanks, Sharath
最满意答案
在不更改原始代码的情况下扩展代码的一种方法是使用MEF,Managed Extensibility Framework。
MEF的目标是.net框架4.0,因为您使用的是SharePoint,所以可能是3.5。
请参阅MEF是否需要.NET 4? 如何让MEF在3.5上工作。
One way to extend code without changing the original code is to use MEF, the Managed Extensibility Framework.
MEF targets .net framework 4.0, since you are using SharePoint you are probably on 3.5.
See Does MEF require .NET 4? for how to get MEF to work on 3.5.
更多推荐
发布评论