Skip to content

Commit 647dffb

Browse files
committed
* Remove TxSelect, TxCommit and TxRollback
1 parent 1dec1d1 commit 647dffb

File tree

5 files changed

+26
-22
lines changed

5 files changed

+26
-22
lines changed

projects/RabbitMQ.Client/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,6 @@ RabbitMQ.Client.IChannel.FlowControl -> System.EventHandler<RabbitMQ.Client.Even
498498
RabbitMQ.Client.IChannel.IsClosed.get -> bool
499499
RabbitMQ.Client.IChannel.IsOpen.get -> bool
500500
RabbitMQ.Client.IChannel.NextPublishSeqNo.get -> ulong
501-
RabbitMQ.Client.IChannel.TxCommit() -> void
502-
RabbitMQ.Client.IChannel.TxRollback() -> void
503-
RabbitMQ.Client.IChannel.TxSelect() -> void
504501
RabbitMQ.Client.IChannel.WaitForConfirms() -> bool
505502
RabbitMQ.Client.IChannel.WaitForConfirmsAsync(System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<bool>
506503
RabbitMQ.Client.IChannel.WaitForConfirmsOrDie() -> void

projects/RabbitMQ.Client/client/api/IChannel.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -650,24 +650,24 @@ Task<QueueDeclareOk> QueueDeclareAsync(string queue, bool durable, bool exclusiv
650650
/// </remarks>
651651
Task QueueUnbindAsync(string queue, string exchange, string routingKey, IDictionary<string, object> arguments);
652652

653-
/// <summary>Commit this session's active TX transaction.</summary>
654-
void TxCommit();
655-
656653
/// <summary>Asynchronously commit this session's active TX transaction.</summary>
657654
Task TxCommitAsync();
658655

659-
/// <summary>Roll back this session's active TX transaction.</summary>
660-
void TxRollback();
661-
662656
/// <summary>Asynchronously roll back this session's active TX transaction.</summary>
663657
Task TxRollbackAsync();
664658

665-
/// <summary>Enable TX mode for this session.</summary>
666-
void TxSelect();
667-
668659
/// <summary>Asynchronously enable TX mode for this session.</summary>
669660
Task TxSelectAsync();
670661

662+
#if SYNC_API
663+
/// <summary>Commit this session's active TX transaction.</summary>
664+
void TxCommit();
665+
/// <summary>Roll back this session's active TX transaction.</summary>
666+
void TxRollback();
667+
/// <summary>Enable TX mode for this session.</summary>
668+
void TxSelect();
669+
#endif
670+
671671
/// <summary>
672672
/// Wait until all published messages on this channel have been confirmed.
673673
/// </summary>

projects/RabbitMQ.Client/client/framing/Channel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ public override void QueueUnbind(string queue, string exchange, string routingKe
256256
{
257257
ChannelRpc(new QueueUnbind(queue, exchange, routingKey, arguments), ProtocolCommandId.QueueUnbindOk);
258258
}
259-
#endif
260259

261260
public override void TxCommit()
262261
{
@@ -272,6 +271,7 @@ public override void TxSelect()
272271
{
273272
ChannelRpc(new TxSelect(), ProtocolCommandId.TxSelectOk);
274273
}
274+
#endif
275275

276276
protected override bool DispatchAsynchronous(in IncomingCommand cmd)
277277
{

projects/RabbitMQ.Client/client/impl/AutorecoveringChannel.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -646,29 +646,30 @@ await _connection.DeleteAutoDeleteExchangeAsync(exchange, recordedEntitiesSemaph
646646
.ConfigureAwait(false);
647647
}
648648

649-
public void TxCommit()
650-
=> InnerChannel.TxCommit();
651-
652649
public Task TxCommitAsync()
653650
=> InnerChannel.TxCommitAsync();
654651

655-
public void TxRollback()
656-
=> InnerChannel.TxRollback();
657652

658653
public Task TxRollbackAsync()
659654
=> InnerChannel.TxRollbackAsync();
660655

661-
public void TxSelect()
656+
public Task TxSelectAsync()
662657
{
663-
InnerChannel.TxSelect();
664658
_usesTransactions = true;
659+
return InnerChannel.TxSelectAsync();
665660
}
666661

667-
public Task TxSelectAsync()
662+
#if SYNC_API
663+
public void TxCommit()
664+
=> InnerChannel.TxCommit();
665+
public void TxRollback()
666+
=> InnerChannel.TxRollback();
667+
public void TxSelect()
668668
{
669+
InnerChannel.TxSelect();
669670
_usesTransactions = true;
670-
return InnerChannel.TxSelectAsync();
671671
}
672+
#endif
672673

673674
public bool WaitForConfirms()
674675
=> InnerChannel.WaitForConfirms();

projects/RabbitMQ.Client/client/impl/ChannelBase.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,7 +1914,9 @@ await ModelSendAsync(method)
19141914
}
19151915
}
19161916

1917+
#if SYNC_API
19171918
public abstract void TxCommit();
1919+
#endif
19181920

19191921
public async Task TxCommitAsync()
19201922
{
@@ -1939,7 +1941,9 @@ await ModelSendAsync(method)
19391941
}
19401942
}
19411943

1944+
#if SYNC_API
19421945
public abstract void TxRollback();
1946+
#endif
19431947

19441948
public async Task TxRollbackAsync()
19451949
{
@@ -1964,7 +1968,9 @@ await ModelSendAsync(method)
19641968
}
19651969
}
19661970

1971+
#if SYNC_API
19671972
public abstract void TxSelect();
1973+
#endif
19681974

19691975
public async Task TxSelectAsync()
19701976
{

0 commit comments

Comments
 (0)