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.
需要创建一个与包内所有接口的所有方法相匹配的方面。
这个方法应该被拦截:
public interface IResource { void doSomething(); }
但这种方法不是:
public class Resource { public void doSomethingElse() { ... } }
我知道 IResource+ 有一种语法,但我如何将它用于所有接口?还有其他方法吗?