Exemple #1
0
        public void Trip(AdsErrorCode error)
        {
            object obj2 = this._synchronizer;

            lock (obj2)
            {
                this._trippedError = error;
                this._state        = this._state.NextState();
                this._state.Trip(error);
                this._state = this._state.NextState();
            }
        }
Exemple #2
0
        public void Succeed()
        {
            object obj2 = this._synchronizer;

            lock (obj2)
            {
                this._state = this._state.NextState();
                this._state.Succeed();
                this._state        = this._state.NextState();
                this._trippedError = AdsErrorCode.NoError;
            }
        }
Exemple #3
0
        public AdsErrorCode Guard()
        {
            AdsErrorCode noError = AdsErrorCode.NoError;
            object       obj2    = this._synchronizer;

            lock (obj2)
            {
                this._state = this._state.NextState();
                noError     = this._state.Guard();
                this._state = this._state.NextState();
            }
            return(noError);
        }
Exemple #4
0
 public void Reset()
 {
     this._state = new ActiveCommunicationState(this._timeout);
 }
Exemple #5
0
 public FailFastHandlerInterceptor(TimeSpan timeout) : base("FailFastHandlerInterceptor")
 {
     this._synchronizer = new object();
     this._state        = new ActiveCommunicationState(timeout);
     this._timeout      = timeout;
 }