[英]How to give access restriction to DLL's in .net
I have a 3 layer application(UI,Business Layer,Data Layer).My requirement is my datalayer should be only accessible by business layer,and the business layer should be only accessible by UI layer. 我有一个三层应用程序(UI,业务层,数据层)。我的要求是我的数据层只能由业务层访问,而业务层应该只能由UI层访问。
That means even if i add a reference of adtalayer in the UI layer,it should not be able to access the methods in Datalayer. 这意味着即使我在UI层中添加了adtalayer的引用,它也不能访问Datalayer中的方法。
I should be able to create DLL's with access protection. 我应该能够创建具有访问保护的DLL。
please suggest a solution for this? 请为此提出解决方案?
Thanks 谢谢
SC SC
您可以标记键类或方法在您的业务和数据层的构造函数internal
,然后使用InternalVisibleTo属性扩展,获得相应的组件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.