diff --git a/src/Microsoft.Azure.ServiceBus/Amqp/AmqpSubscriptionClient.cs b/src/Microsoft.Azure.ServiceBus/Amqp/AmqpSubscriptionClient.cs index 38dffb2f..38e3d102 100644 --- a/src/Microsoft.Azure.ServiceBus/Amqp/AmqpSubscriptionClient.cs +++ b/src/Microsoft.Azure.ServiceBus/Amqp/AmqpSubscriptionClient.cs @@ -61,7 +61,6 @@ public MessageReceiver InnerReceiver MessagingEntityType.Subscriber, this.ReceiveMode, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy, this.PrefetchCount); diff --git a/src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs b/src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs index 660bf8fc..d61965a7 100644 --- a/src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs +++ b/src/Microsoft.Azure.ServiceBus/Core/MessageReceiver.cs @@ -153,7 +153,6 @@ internal MessageReceiver( MessagingEntityType? entityType, ReceiveMode receiveMode, ServiceBusConnection serviceBusConnection, - ITokenProvider tokenProvider, ICbsTokenProvider cbsTokenProvider, RetryPolicy retryPolicy, int prefetchCount = Constants.DefaultClientPrefetchCount, diff --git a/src/Microsoft.Azure.ServiceBus/Core/MessageSender.cs b/src/Microsoft.Azure.ServiceBus/Core/MessageSender.cs index e79dc90e..c8bab0c6 100644 --- a/src/Microsoft.Azure.ServiceBus/Core/MessageSender.cs +++ b/src/Microsoft.Azure.ServiceBus/Core/MessageSender.cs @@ -140,7 +140,6 @@ internal MessageSender( string transferDestinationPath, MessagingEntityType? entityType, ServiceBusConnection serviceBusConnection, - ITokenProvider tokenProvider, ICbsTokenProvider cbsTokenProvider, RetryPolicy retryPolicy) : base(nameof(MessageSender), entityPath, retryPolicy ?? RetryPolicy.Default) diff --git a/src/Microsoft.Azure.ServiceBus/MessageSession.cs b/src/Microsoft.Azure.ServiceBus/MessageSession.cs index 023fa64b..ed523a11 100644 --- a/src/Microsoft.Azure.ServiceBus/MessageSession.cs +++ b/src/Microsoft.Azure.ServiceBus/MessageSession.cs @@ -26,7 +26,7 @@ public MessageSession( int prefetchCount = Constants.DefaultClientPrefetchCount, string sessionId = null, bool isSessionReceiver = false) - : base(entityPath, entityType, receiveMode, serviceBusConnection, null, cbsTokenProvider, retryPolicy, prefetchCount, sessionId, isSessionReceiver) + : base(entityPath, entityType, receiveMode, serviceBusConnection, cbsTokenProvider, retryPolicy, prefetchCount, sessionId, isSessionReceiver) { this.diagnosticSource = new ServiceBusDiagnosticSource(entityPath, serviceBusConnection.Endpoint); } diff --git a/src/Microsoft.Azure.ServiceBus/Microsoft.Azure.ServiceBus.csproj b/src/Microsoft.Azure.ServiceBus/Microsoft.Azure.ServiceBus.csproj index c6c417bd..11e9c1a8 100644 --- a/src/Microsoft.Azure.ServiceBus/Microsoft.Azure.ServiceBus.csproj +++ b/src/Microsoft.Azure.ServiceBus/Microsoft.Azure.ServiceBus.csproj @@ -2,7 +2,7 @@ This is the next generation Azure Service Bus .NET Standard client library that focuses on queues & topics. For more information about Service Bus, see https://azure.microsoft.com/en-us/services/service-bus/ - 3.0.0-preview-01 + 3.0.0 Microsoft netstandard2.0 ../../build/keyfile.snk diff --git a/src/Microsoft.Azure.ServiceBus/QueueClient.cs b/src/Microsoft.Azure.ServiceBus/QueueClient.cs index 23ff5383..679fcc94 100644 --- a/src/Microsoft.Azure.ServiceBus/QueueClient.cs +++ b/src/Microsoft.Azure.ServiceBus/QueueClient.cs @@ -239,7 +239,6 @@ internal MessageSender InnerSender null, MessagingEntityType.Queue, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy); } @@ -265,7 +264,6 @@ internal MessageReceiver InnerReceiver MessagingEntityType.Queue, this.ReceiveMode, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy, this.PrefetchCount); @@ -294,7 +292,6 @@ internal SessionClient SessionClient this.ReceiveMode, this.PrefetchCount, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy, this.RegisteredPlugins); diff --git a/src/Microsoft.Azure.ServiceBus/SessionClient.cs b/src/Microsoft.Azure.ServiceBus/SessionClient.cs index b2b9c3ad..ff88d269 100644 --- a/src/Microsoft.Azure.ServiceBus/SessionClient.cs +++ b/src/Microsoft.Azure.ServiceBus/SessionClient.cs @@ -89,7 +89,6 @@ public SessionClient( prefetchCount, new ServiceBusConnection(connectionString), null, - null, retryPolicy, null) { @@ -169,7 +168,6 @@ internal SessionClient( ReceiveMode receiveMode, int prefetchCount, ServiceBusConnection serviceBusConnection, - ITokenProvider tokenProvider, ICbsTokenProvider cbsTokenProvider, RetryPolicy retryPolicy, IList registeredPlugins) diff --git a/src/Microsoft.Azure.ServiceBus/SubscriptionClient.cs b/src/Microsoft.Azure.ServiceBus/SubscriptionClient.cs index 35ad5bc7..1e840b62 100644 --- a/src/Microsoft.Azure.ServiceBus/SubscriptionClient.cs +++ b/src/Microsoft.Azure.ServiceBus/SubscriptionClient.cs @@ -269,7 +269,6 @@ internal SessionClient SessionClient this.ReceiveMode, this.PrefetchCount, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy, this.RegisteredPlugins); diff --git a/src/Microsoft.Azure.ServiceBus/TopicClient.cs b/src/Microsoft.Azure.ServiceBus/TopicClient.cs index e065b51d..9fee3bee 100644 --- a/src/Microsoft.Azure.ServiceBus/TopicClient.cs +++ b/src/Microsoft.Azure.ServiceBus/TopicClient.cs @@ -154,7 +154,6 @@ internal MessageSender InnerSender null, MessagingEntityType.Topic, this.ServiceBusConnection, - null, this.CbsTokenProvider, this.RetryPolicy); } diff --git a/test/Microsoft.Azure.ServiceBus.UnitTests/MessageTests.cs b/test/Microsoft.Azure.ServiceBus.UnitTests/MessageTests.cs index 5cc48180..937d1894 100644 --- a/test/Microsoft.Azure.ServiceBus.UnitTests/MessageTests.cs +++ b/test/Microsoft.Azure.ServiceBus.UnitTests/MessageTests.cs @@ -188,43 +188,5 @@ public async void LargeMessageShouldThrowMessageSizeExceededException() await queueClient.CloseAsync(); } } - - [Theory] - [DisplayTestMethodName] - [InlineData(null)] - [InlineData("123")] - [InlineData("jøbber-nå")] - public void Should_return_string_representation_of_message(string id) - { - var message = new Message(); - if (id != null) - { - message.MessageId = id; - } - var result = message.ToString(); - Assert.Equal($"{{MessageId:{id}}}", result); - } - - [Fact] - public async void LargeMessageShouldThrowMessageSizeExceededException() - { - var queueClient = new QueueClient(TestUtility.NamespaceConnectionString, TestConstants.NonPartitionedQueueName, ReceiveMode.PeekLock); - - try - { - // 2 MB message. - var message = new Message(new byte[1024 * 1024 * 2]); - await Assert.ThrowsAsync(async () => await queueClient.SendAsync(message)); - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } - finally - { - await queueClient.CloseAsync(); - } - } } } \ No newline at end of file