Dispose() public method

public Dispose ( ) : void
return void
Ejemplo n.º 1
0
 /// <summary>
 /// Callback for when a connection had disconnected
 /// </summary>
 /// <param name="sender">The client object whom is disconnecting</param>
 private void GpspClient_OnDisconnect(GpspClient client)
 {
     // Release this stream's AsyncEventArgs to the object pool
     base.Release(client.Stream);
     if (Clients.TryRemove(client.ConnectionId, out client) && !client.Disposed)
     {
         client.Dispose();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Callback for when a connection had disconnected
 /// </summary>
 /// <param name="sender">The client object whom is disconnecting</param>
 private void GpspClient_OnDisconnect(GpspClient client)
 {
     // Release this stream's AsyncEventArgs to the object pool
     base.Release(client.Stream);
     if (Clients.TryRemove(client.ConnectionId, out client) && !client.Disposed)
         client.Dispose();
 }