Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 WCF 服务中,我有当前公开的方法,但我想对外界隐藏它们,但能够在我的 WCF 服务中使用它们。
我在看的是内部的吗?
yes internal 将限制对当前程序集的访问
http://msdn.microsoft.com/en-us/library/ba0a1yw2.aspx
为了不让外界(WCF 客户端)知道它们,您所要做的就是不使用 [ServiceContract] 属性标记它们,那么它们是否公开也没关系
如果您分发包含 WCF 服务的 DLL,您可以标记这些方法: