.net隐藏实现并提供接口 [英] .net hide implementation and provide interface
问题描述
我正与几位为我开发.net组件的开发人员合作。
I am working with several developers who develop .net components for me.
我管理许可机制并希望隐藏实现。
I manage the licensing mechanism and want to hide the implementation.
我想提供它们的接口,例如 methodIsLicenseValid()
所以他们必须在代码中使用它但不能访问实施。
I would like to just provide them the interface, with for example the methodIsLicenseValid()
so they must use it in the code but cannot access the implementation.
我应该使用哪种模式或技术来实现这一目标?
Which pattern or technology should I use to reach that objective?
推荐答案
您应该使用 Web服务
来公开 methodIsLicenseValid()
,并让您的开发人员调用它会在必要时显示。
You should be using a Web Service
to expose the methodIsLicenseValid()
, and let your devs invoke it whenever necessary.
这将适用于您的生产环境,并且还允许您更改methodIsLicenseValid()的实现,而不会导致开发人员使用hasles,而不是向他们提供库/ dll
This will be suitable for your production environment anyways and also will allow you to change the implementation of the methodIsLicenseValid(), without causing hasles to the devs, as opposed to providing a library/dll to them
这篇关于.net隐藏实现并提供接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!