BACnet.Ethernet.EthernetPort.dispose C# (CSharp) Method

dispose() protected method

Disposes of the all resources held by the ethernet port
protected dispose ( bool disposing ) : void
disposing bool
return void
        protected virtual void dispose(bool disposing)
        {
            if (!_disposed)
            {
                try
                {
                    if (disposing)
                    {
                        if(_device != null)
                        {
                            _device.StopCapture();
                            _device.Close();
                        }
                    }
                }
                finally
                {
                    _disposed = true;
                }
            }
        }