我有一个行为模块和一个在生产中使用的实现。在测试期间,我想用存根或模拟重写一些行为回调。@behaviour BehaviorApiend
defmacro __usingMyOverrideApi do
use Api ## COMPILE ERROR HERE: (ArgumentError) invalid syntax in defdelegate :f
可能是个微不足道的问题..我想实现我自己的错误处理程序来记录错误并监控正在发生的事情。在这一点上,我不想向客户提供我自己的错误。我希望它是透明的-就像默认的WCF行为一样。我应该如何实现ProvideFault来实现这一点?namespace IDATT.Web.Services using System; u
有时,当我使用一个类(让我们称之为MyClass)时,我需要在本地更改它的行为,并确保随后恢复默认行为。using (new MyClassBehaviorSwitcher()) {
// Work with MyClass, which will behave differently// until the end of the block.