public async Task InvokeAsync(Func <Task> func) { if (Interlocked.CompareExchange(ref _isBeingInvoked, Invoking, NotInvoking) == NotInvoking) { await _invoker.InvokeThroughAsync(this, func, _timeout); } else { throw new CircuitBreakerOpenException(); } }
public async Task InvokeAsync(Func <Task> func, CancellationToken cancellationToken = default(CancellationToken)) { await _invoker.InvokeThroughAsync(this, func, _timeout, cancellationToken); }
public async Task InvokeAsync(Func <Task> func) { await _invoker.InvokeThroughAsync(this, func, _timeout); }