public ResilientSubscriber(ResilientConnectionMultiplexer resilientConnectionMultiplexer, Func <ISubscriber> subscriberProvider) { _resilientConnectionMultiplexer = resilientConnectionMultiplexer; _subscriberProvider = subscriberProvider; _lastReconnectTicks = resilientConnectionMultiplexer.LastReconnectTicks; ResetSubscriber(); }
private void ExecuteAction(Action action) { ResilientConnectionMultiplexer.ExecuteAction(_resilientConnectionMultiplexer, () => { CheckAndReset(); action(); }); }
private Task ExecuteActionAsync(Func <Task> action) { return(ResilientConnectionMultiplexer.ExecuteActionAsync(_resilientConnectionMultiplexer, () => { CheckAndReset(); return action(); })); }
private T ExecuteAction <T>(Func <T> action) { return(ResilientConnectionMultiplexer.ExecuteAction(_resilientConnectionMultiplexer, () => { CheckAndReset(); return action(); })); }
private void CheckAndReset() { ResilientConnectionMultiplexer.CheckAndReset( _resilientConnectionMultiplexer.LastReconnectTicks, ref _lastReconnectTicks, _resetLock, ResetSubscriber); }