Beispiel #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (base.connection != null)
         {
             ((AdsConnection)base.connection).AmsRouterNotification -= new AmsRouterNotificationEventHandler(this._connection_AmsRouterNotification);
         }
         this._failFastHandlerInterceptor = null;
         this._connectionStateObserver    = null;
         this._interceptor = null;
     }
     base.Dispose(disposing);
 }
Beispiel #2
0
 ICommunicationInterceptor IInterceptionFactory.CreateInterceptor()
 {
     if (this._interceptor == null)
     {
         CommunicationInterceptors interceptors = new CommunicationInterceptors();
         if (this._settings.ResurrectionTime > TimeSpan.Zero)
         {
             this._failFastHandlerInterceptor = new FailFastHandlerInterceptor(this._settings.ResurrectionTime);
             interceptors.Combine(this._failFastHandlerInterceptor);
         }
         this._connectionStateObserver = new ConnectionStateInterceptor(this);
         interceptors.Combine(this._connectionStateObserver);
         this._interceptor = interceptors;
     }
     return(this._interceptor);
 }