示例#1
0
        public SharpDBTransaction(SharpDBConnection connection, int transactionId)
        {
            Connection = connection;

            TransactionId      = transactionId;
            TransactionIdBytes = BitConverter.GetBytes(transactionId);
        }
示例#2
0
        public SharpDBConnection GetConnection()
        {
            NetMQSocket socket = new NetMQ.Sockets.RequestSocket();

            //	socket.Options.CopyMessages = false;
            socket.Options.Linger = TimeSpan.FromSeconds(5);
            socket.Connect(ConnectionString);

            var connection = new SharpDBConnection(this, socket, SerializerFactory());

            m_connections.Add(connection);

            return(connection);
        }
示例#3
0
 internal void ReleaseConnection(SharpDBConnection connection)
 {
     connection.Socket.Dispose();
     connection.Serializer.Dispose();
 }