public void Test_Retry_指定部分过滤器_将会出现异常2() { TestRetryTask1 task = new TestRetryTask1(); string text = Retry.Create(5, 10) .Filter <NotSupportedException>() .Run(() => { return(task.Exec2()); }); Assert.AreEqual(TestRetryTask1.Result, text); }
public void Test_Retry_指定部分过滤器_将会出现异常() { TestRetryTask1 task = new TestRetryTask1(); string text = Retry.Create(5, 10) .Filter <NotSupportedException>() .Filter <ArgumentOutOfRangeException>(ex => ex.ParamName == "name") .Run(() => { return(task.Exec2()); }); Assert.AreEqual(TestRetryTask1.Result, text); }