public TwoWayRemoteCallInterceptor(IOutputChannel channel, IMessageDispatcher messageDispatcher, IMessageFactory messageFactory, string interfaceName, RemoteExecutionPolicies policies)
 {
     _interfaceName     = interfaceName;
     _channel           = channel;
     _durableConnection = _channel as IDurableConnection;
     _messageDispatcher = messageDispatcher;
     _policies          = policies;
     _messageFactory    = messageFactory;
     GenerateNewCancellationToken();
     if (_durableConnection != null)
     {
         _durableConnection.ConnectionAborted += () =>
         {
             _tokenSource.Aborted = true;
             _tokenSource.Cancel();
         };
         _durableConnection.ConnectionRestored += () =>
         {
             _tokenSource.Restored = true;
             _tokenSource.Cancel();
             GenerateNewCancellationToken();
         };
         _durableConnection.ConnectionInterrupted += () =>
         {
             _tokenSource.Cancel();
             GenerateNewCancellationToken();
         };
     }
 }
 public RemoteCallInterceptor(IMethodInterceptor oneWayInterceptor, IMethodInterceptor twoWayInterceptor, RemoteExecutionPolicies policies)
 {
     _oneWayInterceptor = oneWayInterceptor;
     _twoWayInterceptor = twoWayInterceptor;
     _policies          = policies;
 }