有两种方法可以解决这个问题.第一个涉及使用插件/模块模式. 从这里开始吧.
第二种方法是通过记录良好的程序集简单地公开API逻辑.
你选择的方式实际上归结为你希望如何实现它.例如,Adobe Photoshop在很大程度上使用插件模式.MS Office使用这两个插件,并提供用于处理应用程序的对象接口.
更新: .Net程序集中的对象可以通过将对象范围设置为Public来暴露给外部应用程序使用.这包括Windows窗体,业务对象,枚举等.
从外部开发人员的角度考虑一下.他们需要提供哪些信息才能成功扩展/控制您的产品?无论如何,将其放在帮助文件中.
另外,请使用.Net的自动记录功能.这包括添加IDE已经知道如何通过intellisense读取和显示的XML文档.例如:
/// <summary>
/// Gets all active documents for the specified customer.
/// </summary>
/// <param name="customerId">The Id of the customer.</param>
/// <returns>A list of documents for this customer.</returns>
public static List<Document> GetDocuments(int customerId)
{
//... do something ...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13751 次 |
| 最近记录: |