azure-service-bus-dotnet/test/Microsoft.Azure.ServiceBus....
Neeraj Makam e693fa6ce3
[WIP] Transaction support (#421)
Introduces transaction support.
Operations can now be executed inside a TransactionScope providing atomicity.
Supported operations for transactions:
`SendAsync`, `CompleteAsync`, `DeferAsync`, `DeadLetterAsync`, `AbandonAsync`

Transaction cannot work across connections. Hence, to be able to Send and Receive in a single transaction, `ServiceBusConnection` object has been exposed. Each of the client entities now accepts an already created connection.

Sample usage:
```csharp
var connection = new ServiceBusConnection(ConnectionString);
var sender = new MessageSender(connection, QueueName);
var receiver = new MessageReceiver(connection, QueueName);
var receivedMessage = await receiver.ReceiveAsync();

using (var ts = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
{
	await receiver.CompleteAsync(receivedMessage.SystemProperties.LockToken);
	await sender.SendAsync(message).ConfigureAwait(false);
	ts.Complete();
        // Or, ts.Dispose();
}

await sender.CloseAsync();
await receiver.CloseAsync();
await connection.CloseAsync();
```
2018-03-29 19:38:05 -07:00
..
API [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
Diagnostics [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
MessageInterop [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
Primitives [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
AmqpConverterTests.cs Messages with no TTL now correctly get default TTL (#425) 2018-02-21 13:59:03 -08:00
DisplayTestMethodNameAttribute.cs Cleanups (#80) 2017-02-01 09:37:57 -08:00
ExpectedMessagingExceptionTests.cs Cleanup v3 (#320) 2017-09-14 19:05:36 -07:00
MessageTests.cs Adding MessageSizeExceededException (#422) 2018-02-21 16:09:33 -08:00
Microsoft.Azure.ServiceBus.UnitTests.csproj [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
OnMessageQueueTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
OnMessageTopicSubscriptionTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
OnSessionQueueTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
OnSessionTopicSubscriptionTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
PluginTests.cs replacing explicit types with var we evident (#307) 2017-09-11 11:43:44 -07:00
QueueClientTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
QueueSessionTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
RetryTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
SenderReceiverClientTestBase.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
SenderReceiverTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
ServiceBusConnectionStringBuilderTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
SubscriptionClientTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
TestConstants.cs On session feature (#126) 2017-04-12 14:55:16 -07:00
TestSessionHandler.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
TestUtility.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
TokenProviderTests.cs Wiring up AAD token providers to messaging client (#385) 2017-12-13 18:55:26 -08:00
TopicClientTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
TopicSessionTests.cs Retrypolicy (#110) 2017-03-31 15:40:55 -07:00
TransactionTests.cs [WIP] Transaction support (#421) 2018-03-29 19:38:05 -07:00
WebSocketsEnd2EndTests.cs replacing explicit types with var we evident (#307) 2017-09-11 11:43:44 -07:00
XunitConfig.cs Some random cleanups (#302) 2017-09-08 19:09:52 -07:00