public void Close() { if (baseStream != null) { baseStream.Close(); } }
/// <summary> /// /// </summary> public virtual void Close() { // <!-- Beta:线程阻塞读取模式,主要减少多余封装. // Stop the subThread. ++m_TId; if (m_Thread != null) { m_Thread.Abort(); m_Thread = null; } // Beta --> m_RawStream.Close(); }
/// <summary> /// /// </summary> public virtual int ExitInput() { // TODO #region Beta if (devices[deviceId] == this) { devices[deviceId] = null; } if (asVirtualController && m_VirtualController != null) { int hjId = GetVirtualControllerId(); if (hjId < 0) { Log.w("DeviceBase", "Invalid virtual controller id"); } else if (VirtualController.controllers[hjId] == m_VirtualController) { VirtualController.controllers[hjId] = null; } else { } } #endregion Beta // DeinitSensors(); // if (m_Stream == null) { return(-1); } else { m_Stream.Close(); m_Stream = null; } // Release the Library resource at last. Library.Exit(); return(0); }