private static CommunicationInterceptors CreateDefaultInterceptors() { CommunicationInterceptors interceptors = new CommunicationInterceptors(); interceptors.Combine(new FailFastHandlerInterceptor()); return(interceptors); }
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); }
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); }