public SharpDBTransaction(SharpDBConnection connection, int transactionId) { Connection = connection; TransactionId = transactionId; TransactionIdBytes = BitConverter.GetBytes(transactionId); }
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); }
internal void ReleaseConnection(SharpDBConnection connection) { connection.Socket.Dispose(); connection.Serializer.Dispose(); }