public Read ( System.Data.SqlClient.SqlDataReader reader ) : IReceivedMessageInternal | ||
reader | System.Data.SqlClient.SqlDataReader | |
return | IReceivedMessageInternal |
/// <summary> /// Handles the specified query. /// </summary> /// <param name="query">The query.</param> /// <returns></returns> public async Task <IReceivedMessageInternal> Handle(ReceiveMessageQueryAsync <SqlConnection, SqlTransaction> query) { using (var selectCommand = query.Connection.CreateCommand()) { _buildDequeueCommand.BuildCommand(selectCommand, query); using (var reader = await selectCommand.ExecuteReaderAsync().ConfigureAwait(false)) { return(_readMessage.Read(reader)); } } }
/// <summary> /// Handles the specified query. /// </summary> /// <param name="query">The query.</param> /// <returns></returns> public IReceivedMessageInternal Handle(ReceiveMessageQuery <SqlConnection, SqlTransaction> query) { using (var selectCommand = query.Connection.CreateCommand()) { _buildDequeueCommand.BuildCommand(selectCommand, query); using (var reader = selectCommand.ExecuteReader()) { return(_readMessage.Read(reader)); } } }