Exemplo n.º 1
0
 internal SharpDBConnection(SharpDBClient client, NetMQSocket socket, ISerializer serializer)
 {
     Log          = LogManager.GetLogger(this.GetType());
     m_client     = client;
     Socket       = socket;
     Serializer   = serializer;
     m_isDisposed = false;
 }
Exemplo n.º 2
0
        public void Dispose()
        {
            lock (this)
            {
                if (!m_isDisposed)
                {
                    foreach (SharpDBTransaction transaction in m_transactions)
                    {
                        transaction.Rollback();
                    }

                    m_transactions.Clear();

                    m_client.ReleaseConnection(this);

                    Socket     = null;
                    Serializer = null;
                    m_client   = null;

                    m_isDisposed = true;
                }
            }
        }