static void Main(string[] args) { var testData = new List<Test>(); testData.Add(new Test { Id = 1, Desc = "Fu" }); testData.Add(new Test { Id = 2, Desc = "bar" }); var breaker = new Breaker(typeof(StringBuilder)); Action someAction; someAction = someMethod; breaker.ExecuteAction(someAction); }
private void DoThreadWork() { var randoBreaker = new Breaker(typeof(SomeRandomClass)); // setup a new breaker Assert.IsTrue(randoBreaker.IsClosed, "This random breaker is open and should be closed!"); try { randoBreaker.ExecuteAction(this.DoException); } catch (CircuitBreakerOpenException) { // nom; } }