MySql.Data.MySqlClient.MySqlStream.Close C# (CSharp) Method

Close() public method

public Close ( ) : void
return void
    public void Close()
    {
      outStream.Close();
      inStream.Close();
      timedStream.Close();
    }

Usage Example

コード例 #1
0
        public void Close(bool isOpen)
        {
            try
            {
                if (isOpen)
                {
                    try
                    {
                        packet.Clear();
                        packet.WriteByte((byte)DBCmd.QUIT);
                        ExecutePacket(packet);
                    }
                    catch (Exception ex)
                    {
                        MySqlTrace.LogError(ThreadId, ex.ToString());
                        // Eat exception here. We should try to closing
                        // the stream anyway.
                    }
                }

                if (stream != null)
                {
                    stream.Close();
                }
                stream = null;
            }
            catch (Exception)
            {
                // we are just going to eat any exceptions
                // generated here
            }
        }
All Usage Examples Of MySql.Data.MySqlClient.MySqlStream::Close