0
我有一个标记为过时属性的方法的接口。属性错误参数设置为true使用时会抛出异常。问题是这导致存根不能为整个类生成。当我将该值更改为false存根按预期生成。具有过时属性的存根生成失败,Pex v0.94.51023.0
我正在寻找一种方法来生成存根,同时保留错误参数作为真正。
public interface ICar
{
void Start();
[Obsolete("this is obsolete Stop, stop using it", true)]
void Stop();
}
我试过不同的排列。
<Moles xmlns="http://schemas.microsoft.com/moles/2010/">
<Assembly Name="My.Car.Services"/>
<StubGeneration>
<TypeFilter TypeName="ICar" SkipObsolete="true" />
</StubGeneration>
</Moles>