public override void Abort() { Dictionary <IReliableChannelBinder, TState> faultList; InterruptibleWaitObject closeHandle; lock (base.ThisLock) { faultList = this.faultList; this.faultList = null; closeHandle = this.closeHandle; } if ((faultList == null) || (faultList.Count == 0)) { if (closeHandle != null) { closeHandle.Set(); } } else { foreach (KeyValuePair <IReliableChannelBinder, TState> pair in faultList) { this.AbortState(pair.Value, true); pair.Key.Abort(); } if (closeHandle != null) { closeHandle.Set(); } } }
public void Merge(long sequenceNumber, bool isLast) { Ranges = Ranges.MergeWith(sequenceNumber); if (isLast) { Last = sequenceNumber; } if (AllAdded) { _shutdownWaitObject.Set(); } }
public bool Terminate() { if ((_reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005) || IsSequenceClosed) { if (!_terminated && AllAdded) { _terminateWaitObject.Set(); _terminated = true; } return(_terminated); } return(_isLastKnown); }
protected void RemoveBinder(IReliableChannelBinder binder) { InterruptibleWaitObject closeHandle; lock (base.ThisLock) { if (this.faultList == null) { return; } this.faultList.Remove(binder); if ((this.closeHandle == null) || (this.faultList.Count > 0)) { return; } this.faultList = null; closeHandle = this.closeHandle; } closeHandle.Set(); }