void OnDisconnected(ExceptionalEventArgs e) { if (Disconnected != null) { Disconnected(this, e); } }
private void OnDisconnected(ExceptionalEventArgs e) { if (this.IsDisconnected) { return; } this.IsDisconnected = true; if (this._writer != null) { this._writer.Continue = false; } if (this._reader != null) { this._reader.Continue = false; } this.WrapCallback((Action)(() => this._callbackManager.SetExceptionForAll((Exception) new ClientDisconnectedException(e.Description, e.Exception)))); this._invokeId = 0; this.WrapCallback((Action)(() => { // ISSUE: reference to a compiler-generated field EventHandler disconnected = this.Disconnected; if (disconnected == null) { return; } ExceptionalEventArgs exceptionalEventArgs = e; disconnected((object)this, (EventArgs)exceptionalEventArgs); })); }
void OnDisconnected(ExceptionalEventArgs e) { #pragma warning disable 420 if (Interlocked.Increment(ref disconnectsFired) > 1) { return; } #pragma warning restore 420 if (writer != null) { writer.Continue = false; } if (reader != null) { reader.Continue = false; } try { writerThread.Abort(); } catch { } try { readerThread.Abort(); } catch { } WrapCallback(() => { if (Disconnected != null) { Disconnected(this, e); } }); if (throwDisconnect) { WrapCallback(() => callbackManager.SetExceptionForAll( new ClientDisconnectedException(e.Description, e.Exception))); } }
void OnDisconnected(ExceptionalEventArgs e) { Continue = false; if (Disconnected != null) { Disconnected(this, e); } }
void OnDisconnected(ExceptionalEventArgs e) { _started = false; if (Disconnected != null) { Disconnected(this, e); } }
public void OnDisconnected(ExceptionalEventArgs e) { if (Interlocked.Increment(ref disconnectsFired) > 1) { return; } HasConnected = false; WrapCallback(() => Disconnected?.Invoke(this, e)); WrapCallback(() => callbackManager.SetExceptionForAll(new ClientDisconnectedException(e.Description, e.Exception))); Dispose(true); }
private void OnDisconnected(ExceptionalEventArgs e) { this.Continue = false; // ISSUE: reference to a compiler-generated field EventHandler <ExceptionalEventArgs> disconnected = this.Disconnected; if (disconnected == null) { return; } ExceptionalEventArgs e1 = e; disconnected((object)this, e1); }
private void OnDisconnected(ExceptionalEventArgs e) { if (IsDisconnected) { return; } IsDisconnected = true; if (_writer != null) { _writer.Continue = false; } if (_reader != null) { _reader.Continue = false; } try { _writerThread.Abort(); } catch { } try { _readerThread.Abort(); } catch { } WrapCallback( () => _callbackManager.SetExceptionForAll(new ClientDisconnectedException(e.Description, e.Exception))); _invokeId = 0; WrapCallback(() => { if (Disconnected != null) { Disconnected(this, e); } }); }
private void OnDisconnected(ExceptionalEventArgs e) { if (this.IsDisconnected) { return; } this.IsDisconnected = true; if (this._writer != null) { this._writer.Continue = false; } if (this._reader != null) { this._reader.Continue = false; } this.WrapCallback(() => this._callbackManager.SetExceptionForAll((Exception) new ClientDisconnectedException(e.Description, e.Exception))); this._invokeId = 0; this.WrapCallback(() => { Disconnected?.Invoke(this, e); }); }
void OnDisconnected(ExceptionalEventArgs e) { if (Interlocked.Increment(ref disconnectsFired) > 1) { return; } if (writer != null) { writer.Continue = false; } if (reader != null) { reader.Continue = false; } try { writerThread.Abort(); } catch { } try { readerThread.Abort(); } catch { } WrapCallback(() => Disconnected?.Invoke(this, e)); WrapCallback(() => callbackManager.SetExceptionForAll(new ClientDisconnectedException(e.Description, e.Exception))); }
void OnPacketProcessorDisconnected(object sender, ExceptionalEventArgs args) { OnDisconnected(args); }
private void OnPacketProcessorDisconnected(object sender, ExceptionalEventArgs e) { this.OnDisconnected(e); }
void OnDisconnected(ExceptionalEventArgs e) => Disconnected?.Invoke(this, e);