コード例 #1
0
 public ResilientSubscriber(ResilientConnectionMultiplexer resilientConnectionMultiplexer, Func <ISubscriber> subscriberProvider)
 {
     _resilientConnectionMultiplexer = resilientConnectionMultiplexer;
     _subscriberProvider             = subscriberProvider;
     _lastReconnectTicks             = resilientConnectionMultiplexer.LastReconnectTicks;
     ResetSubscriber();
 }
コード例 #2
0
 private void ExecuteAction(Action action)
 {
     ResilientConnectionMultiplexer.ExecuteAction(_resilientConnectionMultiplexer, () =>
     {
         CheckAndReset();
         action();
     });
 }
コード例 #3
0
 private Task ExecuteActionAsync(Func <Task> action)
 {
     return(ResilientConnectionMultiplexer.ExecuteActionAsync(_resilientConnectionMultiplexer, () =>
     {
         CheckAndReset();
         return action();
     }));
 }
コード例 #4
0
 private T ExecuteAction <T>(Func <T> action)
 {
     return(ResilientConnectionMultiplexer.ExecuteAction(_resilientConnectionMultiplexer, () =>
     {
         CheckAndReset();
         return action();
     }));
 }
コード例 #5
0
 private void CheckAndReset()
 {
     ResilientConnectionMultiplexer.CheckAndReset(
         _resilientConnectionMultiplexer.LastReconnectTicks,
         ref _lastReconnectTicks,
         _resetLock,
         ResetSubscriber);
 }