From a6e309e26528cb18060a25ae637ba84cdd07305a Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Wed, 19 Apr 2023 19:12:45 -0500 Subject: [PATCH 01/26] feat(): migrate to package references --- .gitignore | 3 +- packages/repositories.config | 16 ------- ...Extensions.Azure.ServiceBus.Autofac.csproj | 8 ++-- .../packages.config | 4 -- ...ions.Azure.ServiceBus.CastleWindsor.csproj | 15 +++--- .../packages.config | 5 -- ...Extensions.Azure.ServiceBus.Ninject.csproj | 8 ++-- .../packages.config | 4 -- ...sions.Azure.ServiceBus.StructureMap.csproj | 8 ++-- .../packages.config | 4 -- ...ctExtensions.Azure.ServiceBus.Unity.csproj | 16 ++----- .../packages.config | 5 -- .../ProjectExtensions.Azure.ServiceBus.csproj | 32 ++++++------- .../app.config | 30 +----------- .../packages.config | 7 --- .../PubSubUsingCastleWindsor.csproj | 45 ++++++++--------- .../PubSubUsingCastleWindsor/packages.config | 9 ---- .../PubSubUsingConfiguration.csproj | 40 +++++++--------- .../PubSubUsingConfiguration/app.config | 31 ++---------- .../PubSubUsingConfiguration/packages.config | 8 ---- .../PubSubUsingNinject.csproj | 38 +++++++-------- .../PubSubUsingNinject/packages.config | 8 ---- .../PubSubUsingStructureMap.csproj | 40 +++++++--------- .../PubSubUsingStructureMap/packages.config | 8 ---- .../PubSubUsingUnity/PubSubUsingUnity.csproj | 48 +++++++------------ src/Samples/PubSubUsingUnity/packages.config | 9 ---- ....Azure.ServiceBus.Tests.Integration.csproj | 22 ++++----- .../packages.config | 6 --- ...ensions.Azure.ServiceBus.Tests.Unit.csproj | 46 ++++++++---------- .../app.config | 30 +----------- .../packages.config | 9 ---- 31 files changed, 156 insertions(+), 406 deletions(-) delete mode 100644 packages/repositories.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus.Autofac/packages.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/packages.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus.Ninject/packages.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus.StructureMap/packages.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus.Unity/packages.config delete mode 100644 src/ProjectExtensions.Azure.ServiceBus/packages.config delete mode 100644 src/Samples/PubSubUsingCastleWindsor/packages.config delete mode 100644 src/Samples/PubSubUsingConfiguration/packages.config delete mode 100644 src/Samples/PubSubUsingNinject/packages.config delete mode 100644 src/Samples/PubSubUsingStructureMap/packages.config delete mode 100644 src/Samples/PubSubUsingUnity/packages.config delete mode 100644 src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/packages.config delete mode 100644 src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/packages.config diff --git a/.gitignore b/.gitignore index 57c9036..1ad4251 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,5 @@ _ReSharper*/ [Tt]est[Rr]esult* .hg/ BuildOutput/* -packages/* \ No newline at end of file +packages/* +/.vs/ diff --git a/packages/repositories.config b/packages/repositories.config deleted file mode 100644 index f21a521..0000000 --- a/packages/repositories.config +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj index d7486ab..590a52c 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj @@ -33,10 +33,6 @@ bin\Release\ProjectExtensions.Azure.ServiceBus.Autofac.XML - - False - ..\..\packages\Autofac.3.3.0\lib\net40\Autofac.dll - @@ -60,7 +56,9 @@ - + + 3.3.0 + - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/ProjectExtensions.Azure.ServiceBus/packages.config b/src/ProjectExtensions.Azure.ServiceBus/packages.config deleted file mode 100644 index 4b836bf..0000000 --- a/src/ProjectExtensions.Azure.ServiceBus/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index 3b3f878..e0c00cc 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -36,30 +36,6 @@ PubSubUsingConfiguration.Program - - False - ..\..\..\packages\Castle.Core.3.2.2\lib\net40-client\Castle.Core.dll - - - False - ..\..\..\packages\Castle.Windsor.3.2.1\lib\net40\Castle.Windsor.dll - - - False - ..\..\..\packages\WindowsAzure.ServiceBus.2.4.9.0\lib\net40-full\Microsoft.ServiceBus.dll - - - False - ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll - - - False - ..\..\..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - - - False - ..\..\..\packages\NLog.2.1.0\lib\net40\NLog.dll - @@ -97,7 +73,6 @@ app.config - @@ -109,6 +84,26 @@ ProjectExtensions.Azure.ServiceBus + + + 3.2.2 + + + 3.2.1 + + + 2.0.3 + + + 5.0.8 + + + 2.1.0 + + + 2.4.9 + + + - + @@ -19,29 +19,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/Samples/PubSubUsingConfiguration/packages.config b/src/Samples/PubSubUsingConfiguration/packages.config deleted file mode 100644 index 16258a7..0000000 --- a/src/Samples/PubSubUsingConfiguration/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index e6d29b8..19aab7f 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -33,26 +33,6 @@ 4 - - False - ..\..\..\packages\WindowsAzure.ServiceBus.2.4.9.0\lib\net40-full\Microsoft.ServiceBus.dll - - - False - ..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.2.0.3\lib\net40\Microsoft.WindowsAzure.Configuration.dll - - - False - ..\..\..\packages\Newtonsoft.Json.5.0.8\lib\net40\Newtonsoft.Json.dll - - - False - ..\..\..\packages\Ninject.3.0.1.10\lib\net40\Ninject.dll - - - False - ..\..\..\packages\NLog.2.1.0\lib\net40\NLog.dll - @@ -100,7 +80,23 @@ app.config - + + + + 2.0.3 + + + 5.0.8 + + + 3.0.1.10 + + + 2.1.0 + + + 2.4.9 + - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/packages.config b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/packages.config deleted file mode 100644 index 79ac724..0000000 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file From 948240c0e38ac38a44e27671cf2af5fbe584957a Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Wed, 19 Apr 2023 23:42:09 -0500 Subject: [PATCH 02/26] feat(): clean up references and namespaces (does compile) --- .../Container/AutofacAzureBusContainer.cs | 7 +- ...utofacBusConfigurationBuilderExtensions.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 - ...indsorBusConfigurationBuilderExtensions.cs | 8 +- .../Container/CastleWindsorBusContainer.cs | 14 +- .../Properties/AssemblyInfo.cs | 2 - .../Container/NinjectAzureBusContainer.cs | 11 +- ...injectBusConfigurationBuilderExtensions.cs | 6 +- .../Properties/AssemblyInfo.cs | 1 - .../StructureMapAzureBusContainer.cs | 4 +- ...ureMapBusConfigurationBuilderExtensions.cs | 2 +- .../Properties/AssemblyInfo.cs | 2 - .../Container/UnityAzureBusContainer.cs | 7 +- .../UnityBusConfigurationBuilderExtensions.cs | 10 +- .../Properties/AssemblyInfo.cs | 1 - .../AnonymousDisposable.cs | 7 +- .../AzureBus.cs | 14 +- .../AzureSenderReceiverBase.cs | 13 +- .../ServiceBusMessagingFactoryFactory.cs | 11 +- .../ServiceBusNamespaceManagerFactory.cs | 10 +- .../ServiceBusTokenProvider.cs | 9 +- .../BrokeredMessageWrapper.cs | 6 +- .../BusConfiguration.cs | 29 ++- .../BusConfigurationBuilder.cs | 14 +- .../CloudEnvironment.cs | 5 +- .../Container/AzureBusContainerBase.cs | 9 +- .../Container/IAzureBusContainer.cs | 7 +- .../Exceptions/TopicDeletedException.cs | 3 - .../ExtensionMethods.cs | 7 +- .../GenericServiceBusConfigurationFactory.cs | 8 +- .../Helpers/BusHelper.cs | 7 +- .../Helpers/MD5Helper.cs | 6 +- .../Helpers/ReflectionHelper.cs | 5 +- .../IBrokeredMessage.cs | 6 +- .../IBus.cs | 2 - .../IBusConfiguration.cs | 6 +- .../IMessageHandler.cs | 7 +- .../IMessageSentResult.cs | 4 +- .../IReceivedMessage.cs | 7 +- .../Interfaces/IMessagingFactory.cs | 7 +- .../Interfaces/INamespaceManager.cs | 9 +- .../IServiceBusConfigurationFactory.cs | 10 +- .../IServiceBusSetupConfiguration.cs | 6 +- .../Interfaces/IServiceBusTokenProvider.cs | 11 +- .../Interfaces/ISubscriptionClient.cs | 9 +- .../Interfaces/ITopicClient.cs | 6 +- .../MessageHandlerConfigurationAttribute.cs | 8 +- .../Receiver/AzureBusReceiver.cs | 20 +- .../Receiver/AzureBusReceiverState.cs | 7 +- .../Receiver/AzureReceiveState.cs | 11 +- .../Receiver/AzureReceiverHelper.cs | 16 +- .../Receiver/ReceivedMessage.cs | 6 +- .../Sender/AzureBusSender.cs | 15 +- .../Sender/MessageSentResult.cs | 3 - .../Serialization/IServiceBusSerializer.cs | 3 - .../Serialization/JsonServiceBusSerializer.cs | 9 +- .../Serialization/ServiceBusSerializerBase.cs | 3 - .../Serialization/XmlServiceBusSerializer.cs | 9 +- .../ServiceBusEnpointData.cs | 10 +- .../ServiceBusSetupConfiguration.cs | 10 +- .../SingletonMessageHandlerAttribute.cs | 2 +- .../ExponentialBackoff.cs | 27 +-- .../FixedInterval.cs | 38 ++-- .../TransientFaultHandling.Core/Guard.cs | 69 +++---- .../ITransientErrorDetectionStrategy.cs | 6 +- .../Incremental.cs | 27 +-- .../RetryLimitExceededException.cs | 21 +- .../RetryPolicy.Generic.cs | 21 +- .../RetryPolicy.cs | 116 ++++------- .../RetryStrategy.cs | 11 +- .../RetryingEventArgs.cs | 9 +- .../AzureStorage/AzureStorageExtensions.cs | 18 +- .../StorageTransientErrorDetectionStrategy.cs | 64 +++--- .../TransientFaultHandlingDesignTime.cs | 18 +- .../ExtensionMethods.cs | 17 +- .../TransientFaultHandling/RetryManager.cs | 39 ++-- .../RetryManagerImpl.cs | 22 +-- .../RetryPolicyException.cs | 18 +- ...rviceBusTransientErrorDetectionStrategy.cs | 74 +++---- ...orToDetermineExistanceDetectionStrategy.cs | 13 +- .../Wrappers/SubscriptionClientWrapper.cs | 9 +- .../Wrappers/TopicClientWrapper.cs | 11 +- .../PubSubUsingCastleWindsor/Bootstrapper.cs | 1 - .../Properties/AssemblyInfo.cs | 2 - .../AnotherTestMessage.cs | 7 +- .../AnotherTestMessageSubscriber.cs | 187 +++++++++++++++++- .../PubSubUsingConfiguration/Bootstrapper.cs | 2 +- .../GZipXmlSerializer.cs | 9 +- .../PubSubUsingConfiguration/Program.cs | 10 +- .../Properties/AssemblyInfo.cs | 1 - .../PubSubUsingConfiguration/TestMessage.cs | 55 +++++- .../TestMessageSubscriber.cs | 68 ++++++- .../Properties/AssemblyInfo.cs | 2 - .../PubSubUsingStructureMap/Bootstrapper.cs | 1 - .../Properties/AssemblyInfo.cs | 2 - src/Samples/PubSubUsingUnity/Bootstrapper.cs | 1 - .../Properties/AssemblyInfo.cs | 2 - .../Properties/AssemblyInfo.cs | 1 - .../Config.cs | 14 +- .../Handlers/TestMessageForTestingHandler.cs | 21 +- .../Interfaces/IMockServiceBus.cs | 7 +- .../Messages/TestMessageForTesting.cs | 3 - .../Mocks/MockBrokeredMessage.cs | 8 +- .../Mocks/MockIAsyncResult.cs | 3 - .../Mocks/MockMessagingFactory.cs | 10 +- .../Mocks/MockNamespaceManager.cs | 8 +- .../Mocks/MockServiceBus.cs | 15 +- .../Mocks/MockSubscriptionClient.cs | 9 +- .../Mocks/MockTopicClient.cs | 8 +- .../Properties/AssemblyInfo.cs | 1 - .../SampleTest.cs | 9 +- 111 files changed, 710 insertions(+), 876 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs index 5007215..3ae98c5 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs @@ -1,8 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Autofac; +using Autofac; using ProjectExtensions.Azure.ServiceBus.Container; +using System; +using System.Collections.Generic; namespace ProjectExtensions.Azure.ServiceBus.Autofac.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacBusConfigurationBuilderExtensions.cs index 887cec7..38b6068 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacBusConfigurationBuilderExtensions.cs @@ -15,6 +15,6 @@ public static BusConfigurationBuilder UseAutofacContainer(this BusConfigurationB builder.Configuration.Container = new AutofacAzureBusContainer(container); return builder; } - + } } \ No newline at end of file diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Properties/AssemblyInfo.cs b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Properties/AssemblyInfo.cs index 9ca652d..5f5784f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Properties/AssemblyInfo.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusConfigurationBuilderExtensions.cs index 6b660e7..9ddc53f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusConfigurationBuilderExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Castle.Windsor; +using Castle.Windsor; namespace ProjectExtensions.Azure.ServiceBus.CastleWindsor.Container { /// @@ -15,7 +11,7 @@ public static class CastleWindsorBusConfigurationBuilderExtensions { /// /// Castle Windsor container used in your application. This is optional. A new container will be created if one is not provided /// - public static BusConfigurationBuilder UseCastleWindsorContainer(this BusConfigurationBuilder builder, IWindsorContainer container = null) { + public static BusConfigurationBuilder UseCastleWindsorContainer(this BusConfigurationBuilder builder, IWindsorContainer container = null) { builder.Configuration.Container = new CastleWindsorBusContainer(container); return builder; } diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusContainer.cs index a1f2a6a..180c6f6 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Container/CastleWindsorBusContainer.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Castle.MicroKernel.Registration; +using Castle.MicroKernel.Registration; using Castle.Windsor; using ProjectExtensions.Azure.ServiceBus.Container; +using System; namespace ProjectExtensions.Azure.ServiceBus.CastleWindsor.Container { /// @@ -12,7 +9,7 @@ namespace ProjectExtensions.Azure.ServiceBus.CastleWindsor.Container { /// public class CastleWindsorBusContainer : AzureBusContainerBase { IWindsorContainer container; - + /// /// Constructor. /// @@ -26,7 +23,7 @@ public CastleWindsorBusContainer(IWindsorContainer container = null) { /// /// /// - public override T Resolve() { + public override T Resolve() { return container.Resolve(); } @@ -48,7 +45,8 @@ public override object Resolve(Type t) { public override void Register(Type serviceType, Type implementationType, bool perInstance = false) { if (perInstance) { container.Register(Component.For(serviceType).ImplementedBy(implementationType).LifestyleTransient()); - } else { + } + else { container.Register(Component.For(serviceType).ImplementedBy(implementationType).LifestyleSingleton()); } } diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Properties/AssemblyInfo.cs b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Properties/AssemblyInfo.cs index a1191f1..cf0f6f9 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Properties/AssemblyInfo.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectAzureBusContainer.cs index 6c38531..5da7e89 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectAzureBusContainer.cs @@ -1,14 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Ninject; -using Ninject.Activation; +using Ninject; using Ninject.Parameters; using ProjectExtensions.Azure.ServiceBus.Container; +using System; +using System.Collections.Generic; namespace ProjectExtensions.Azure.ServiceBus.Ninject.Container { - + /// /// Implementation of for Ninject. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectBusConfigurationBuilderExtensions.cs index 82e43dc..835943f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Container/NinjectBusConfigurationBuilderExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Ninject; +using Ninject; namespace ProjectExtensions.Azure.ServiceBus.Ninject.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Properties/AssemblyInfo.cs b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Properties/AssemblyInfo.cs index ab70da1..981a426 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/Properties/AssemblyInfo.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapAzureBusContainer.cs index 07cd153..195c31e 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapAzureBusContainer.cs @@ -1,7 +1,7 @@ -using System; -using ProjectExtensions.Azure.ServiceBus.Container; +using ProjectExtensions.Azure.ServiceBus.Container; using StructureMap; using StructureMap.Pipeline; +using System; namespace ProjectExtensions.Azure.ServiceBus.StructureMap.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapBusConfigurationBuilderExtensions.cs index 18bc7c2..df3bd9b 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Container/StructureMapBusConfigurationBuilderExtensions.cs @@ -11,7 +11,7 @@ public static class StructureMapBusConfigurationBuilderExtensions { /// /// Structure Map container used in your application. This is optional. A new container will be created if one is not provided /// - public static BusConfigurationBuilder UseStructureMapContainer(this BusConfigurationBuilder builder, IContainer container = null) { + public static BusConfigurationBuilder UseStructureMapContainer(this BusConfigurationBuilder builder, IContainer container = null) { builder.Configuration.Container = new StructureMapAzureBusContainer(container); return builder; } diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Properties/AssemblyInfo.cs b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Properties/AssemblyInfo.cs index 456e119..9db1aca 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Properties/AssemblyInfo.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs index 74eaf15..18e0c01 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Practices.Unity; +using Microsoft.Practices.Unity; using ProjectExtensions.Azure.ServiceBus.Container; +using System; namespace ProjectExtensions.Azure.ServiceBus.Unity.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs index 195352d..9d461aa 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Practices.Unity; -using ProjectExtensions.Azure.ServiceBus; -using ProjectExtensions.Azure.ServiceBus.Unity.Container; +using Microsoft.Practices.Unity; namespace ProjectExtensions.Azure.ServiceBus.Unity.Container { /// @@ -17,7 +11,7 @@ public static class UnityBusConfigurationBuilderExtensions { /// /// Unity container used in your application. This is optional. A new container will be created if one is not provided /// - public static BusConfigurationBuilder UseUnityContainer(this BusConfigurationBuilder builder, IUnityContainer container = null) { + public static BusConfigurationBuilder UseUnityContainer(this BusConfigurationBuilder builder, IUnityContainer container = null) { builder.Configuration.Container = new UnityAzureBusContainer(container); return builder; } diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/Properties/AssemblyInfo.cs b/src/ProjectExtensions.Azure.ServiceBus.Unity/Properties/AssemblyInfo.cs index 1951dd0..6ebd967 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/Properties/AssemblyInfo.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/ProjectExtensions.Azure.ServiceBus/AnonymousDisposable.cs b/src/ProjectExtensions.Azure.ServiceBus/AnonymousDisposable.cs index 448cd3f..e4cde1f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AnonymousDisposable.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AnonymousDisposable.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using NLog; +using System; using System.Threading; -using NLog; namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/AzureBus.cs b/src/ProjectExtensions.Azure.ServiceBus/AzureBus.cs index 5284a71..d5b79e9 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AzureBus.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AzureBus.cs @@ -1,13 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Reflection; +using Microsoft.Practices.TransientFaultHandling; using NLog; -using System.Linq.Expressions; -using Microsoft.Practices.TransientFaultHandling; using ProjectExtensions.Azure.ServiceBus.Helpers; using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; namespace ProjectExtensions.Azure.ServiceBus { @@ -76,7 +74,7 @@ public void RegisterAssembly(Assembly assembly) { /// /// The message to publish. public void Publish(T message) { - sender.Send(message, default(IDictionary)); + sender.Send(message, default); } /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/AzureSenderReceiverBase.cs b/src/ProjectExtensions.Azure.ServiceBus/AzureSenderReceiverBase.cs index 9606772..9452dce 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AzureSenderReceiverBase.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AzureSenderReceiverBase.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using Microsoft.ServiceBus; using NLog; -using Microsoft.Practices.TransientFaultHandling; -using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus; -using ProjectExtensions.Azure.ServiceBus.TransientFaultHandling.ServiceBus; -using System.Net; using ProjectExtensions.Azure.ServiceBus.Interfaces; +using ProjectExtensions.Azure.ServiceBus.TransientFaultHandling.ServiceBus; +using System; namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusMessagingFactoryFactory.cs b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusMessagingFactoryFactory.cs index 267a414..91a02d3 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusMessagingFactoryFactory.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusMessagingFactoryFactory.cs @@ -1,14 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; -using Microsoft.ServiceBus; +using NLog; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Wrappers; using System.IO; -using NLog; namespace ProjectExtensions.Azure.ServiceBus.AzureServiceBusFactories { diff --git a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusNamespaceManagerFactory.cs b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusNamespaceManagerFactory.cs index e9022eb..dc18007 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusNamespaceManagerFactory.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusNamespaceManagerFactory.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; -using Microsoft.ServiceBus.Messaging; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus; -using Microsoft.Practices.TransientFaultHandling; +using Microsoft.ServiceBus.Messaging; using NLog; +using ProjectExtensions.Azure.ServiceBus.Interfaces; namespace ProjectExtensions.Azure.ServiceBus.AzureServiceBusFactories { diff --git a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusTokenProvider.cs b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusTokenProvider.cs index 032b3de..c518eef 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusTokenProvider.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/AzureServiceBusFactories/ServiceBusTokenProvider.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System; namespace ProjectExtensions.Azure.ServiceBus.AzureServiceBusFactories { diff --git a/src/ProjectExtensions.Azure.ServiceBus/BrokeredMessageWrapper.cs b/src/ProjectExtensions.Azure.ServiceBus/BrokeredMessageWrapper.cs index 7b61fde..eb3420f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/BrokeredMessageWrapper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/BrokeredMessageWrapper.cs @@ -1,8 +1,6 @@ -using System; +using Microsoft.ServiceBus.Messaging; +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/BusConfiguration.cs b/src/ProjectExtensions.Azure.ServiceBus/BusConfiguration.cs index e027b88..9fd69ad 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/BusConfiguration.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/BusConfiguration.cs @@ -1,16 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Reflection; +using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.AzureServiceBusFactories; using ProjectExtensions.Azure.ServiceBus.Container; -using ProjectExtensions.Azure.ServiceBus.Serialization; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Factories; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Receiver; using ProjectExtensions.Azure.ServiceBus.Sender; -using ProjectExtensions.Azure.ServiceBus.Interfaces; -using ProjectExtensions.Azure.ServiceBus.AzureServiceBusFactories; -using ProjectExtensions.Azure.ServiceBus.Factories; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; +using System.Collections.Generic; +using System.Reflection; namespace ProjectExtensions.Azure.ServiceBus { @@ -19,7 +17,7 @@ namespace ProjectExtensions.Azure.ServiceBus { /// public class BusConfiguration : IBusConfiguration { static readonly BusConfiguration configuration = new BusConfiguration(); - + IAzureBusContainer container; List registeredAssemblies = new List(); List registeredSubscribers = new List(); @@ -41,8 +39,7 @@ private BusConfiguration() { /// Gets the singleton instance /// public static IBusConfiguration Instance { - get - { + get { return configuration; } } @@ -68,7 +65,7 @@ public IAzureBusContainer Container { return container; } set { - if (container != null) { + if (container != null) { throw new NotSupportedException("The container can only be set once."); } Guard.ArgumentNotNull(value, "Container"); @@ -76,7 +73,7 @@ public IAzureBusContainer Container { } } - + /// /// DefaultSerializer /// @@ -203,7 +200,7 @@ public void Configure() { container.Register(typeof(IServiceBusSerializer), typeof(JsonServiceBusSerializer)); } container.Build(); - + //Set the Bus property so that the receiver will register the end points this.Bus = container.Bus; this.Bus.Initialize(); diff --git a/src/ProjectExtensions.Azure.ServiceBus/BusConfigurationBuilder.cs b/src/ProjectExtensions.Azure.ServiceBus/BusConfigurationBuilder.cs index ea76f63..0fd278c 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/BusConfigurationBuilder.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/BusConfigurationBuilder.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Reflection; +using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; using System.Configuration; -using Microsoft.Practices.TransientFaultHandling; -using ProjectExtensions.Azure.ServiceBus.Helpers; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System.Reflection; namespace ProjectExtensions.Azure.ServiceBus { @@ -106,7 +102,7 @@ public BusConfigurationBuilder ReadFromConfigFile() { throw new ArgumentNullException("ServiceBusNamespace", "The ServiceBusNamespace must be set."); } configuration.ServiceBusNamespace = setting; - + setting = ConfigurationManager.AppSettings["ServiceBusTopic"]; if (!string.IsNullOrWhiteSpace(setting)) { configuration.TopicName = setting; diff --git a/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs b/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs index 8d8cd1e..89723e0 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs @@ -1,13 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Web; namespace ProjectExtensions.Azure.ServiceBus { static class CloudEnvironment { - + /// /// Ensures that the HttpContext object is safe to use in the given context and returns an object that rolls the HttpContext object back to its original state. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Container/AzureBusContainerBase.cs b/src/ProjectExtensions.Azure.ServiceBus/Container/AzureBusContainerBase.cs index b1f0224..0dfb602 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Container/AzureBusContainerBase.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Container/AzureBusContainerBase.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Serialization; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; namespace ProjectExtensions.Azure.ServiceBus.Container { - + /// /// Base class for all Containers. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Container/IAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus/Container/IAzureBusContainer.cs index 3af3ff5..7a5398b 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Container/IAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Container/IAzureBusContainer.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Serialization; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; namespace ProjectExtensions.Azure.ServiceBus.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Exceptions/TopicDeletedException.cs b/src/ProjectExtensions.Azure.ServiceBus/Exceptions/TopicDeletedException.cs index ff74e91..a7c3ddb 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Exceptions/TopicDeletedException.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Exceptions/TopicDeletedException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ProjectExtensions.Azure.ServiceBus.Exceptions { diff --git a/src/ProjectExtensions.Azure.ServiceBus/ExtensionMethods.cs b/src/ProjectExtensions.Azure.ServiceBus/ExtensionMethods.cs index d6c3d5f..4315209 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ExtensionMethods.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/ExtensionMethods.cs @@ -1,8 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NLog; +using NLog; +using System; namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Factories/GenericServiceBusConfigurationFactory.cs b/src/ProjectExtensions.Azure.ServiceBus/Factories/GenericServiceBusConfigurationFactory.cs index e7d4fc0..496df0e 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Factories/GenericServiceBusConfigurationFactory.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Factories/GenericServiceBusConfigurationFactory.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.TransientFaultHandling; using ProjectExtensions.Azure.ServiceBus.Interfaces; -using Microsoft.Practices.TransientFaultHandling; -using Microsoft.ServiceBus; -using Microsoft.ServiceBus.Messaging; namespace ProjectExtensions.Azure.ServiceBus.Factories { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Helpers/BusHelper.cs b/src/ProjectExtensions.Azure.ServiceBus/Helpers/BusHelper.cs index 7265732..7fce761 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Helpers/BusHelper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Helpers/BusHelper.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; +using Microsoft.Practices.TransientFaultHandling; +using System; using System.Linq; -using System.Text; -using Microsoft.Practices.TransientFaultHandling; -using NLog; namespace ProjectExtensions.Azure.ServiceBus.Helpers { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Helpers/MD5Helper.cs b/src/ProjectExtensions.Azure.ServiceBus/Helpers/MD5Helper.cs index ac5b203..333fd02 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Helpers/MD5Helper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Helpers/MD5Helper.cs @@ -1,11 +1,9 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Security.Cryptography; +using System.Text; namespace ProjectExtensions.Azure.ServiceBus.Helpers { - + class MD5Helper { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Helpers/ReflectionHelper.cs b/src/ProjectExtensions.Azure.ServiceBus/Helpers/ReflectionHelper.cs index 6a48e9e..bf56d73 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Helpers/ReflectionHelper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Helpers/ReflectionHelper.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Reflection; using System.Linq.Expressions; +using System.Reflection; namespace ProjectExtensions.Azure.ServiceBus.Helpers { diff --git a/src/ProjectExtensions.Azure.ServiceBus/IBrokeredMessage.cs b/src/ProjectExtensions.Azure.ServiceBus/IBrokeredMessage.cs index 2c8e05a..e909c26 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IBrokeredMessage.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IBrokeredMessage.cs @@ -1,9 +1,7 @@ -using System; +//DO NOT Change the namespace. +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -//DO NOT Change the namespace. namespace ProjectExtensions.Azure.ServiceBus { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/IBus.cs b/src/ProjectExtensions.Azure.ServiceBus/IBus.cs index 420851b..7ef09aa 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IBus.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IBus.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Reflection; //DO NOT Change the namespace. diff --git a/src/ProjectExtensions.Azure.ServiceBus/IBusConfiguration.cs b/src/ProjectExtensions.Azure.ServiceBus/IBusConfiguration.cs index 3f32c25..10b9533 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IBusConfiguration.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IBusConfiguration.cs @@ -1,8 +1,8 @@ -using System; +using ProjectExtensions.Azure.ServiceBus.Container; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; using System.Collections.Generic; using System.Reflection; -using ProjectExtensions.Azure.ServiceBus.Container; -using ProjectExtensions.Azure.ServiceBus.Serialization; //DO NOT Change the namespace. namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/IMessageHandler.cs b/src/ProjectExtensions.Azure.ServiceBus/IMessageHandler.cs index bcd6e2c..990bc05 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IMessageHandler.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IMessageHandler.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -//DO NOT Change the namespace. +//DO NOT Change the namespace. namespace ProjectExtensions.Azure.ServiceBus { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/IMessageSentResult.cs b/src/ProjectExtensions.Azure.ServiceBus/IMessageSentResult.cs index 7db911e..42a3654 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IMessageSentResult.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IMessageSentResult.cs @@ -1,6 +1,6 @@ -using System; +//DO NOT Change the namespace. +using System; -//DO NOT Change the namespace. namespace ProjectExtensions.Azure.ServiceBus { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/IReceivedMessage.cs b/src/ProjectExtensions.Azure.ServiceBus/IReceivedMessage.cs index 0f133ba..dcca16b 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/IReceivedMessage.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/IReceivedMessage.cs @@ -1,11 +1,8 @@ -using System; +//DO NOT Change the namespace. using System.Collections.Generic; -using System.Linq; -using System.Text; -//DO NOT Change the namespace. namespace ProjectExtensions.Azure.ServiceBus { - + /// /// Main interface that is passed to the Handlers. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IMessagingFactory.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IMessagingFactory.cs index 68d0600..ff51a42 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IMessagingFactory.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IMessagingFactory.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; -using Microsoft.ServiceBus; +using Microsoft.ServiceBus.Messaging; using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/INamespaceManager.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/INamespaceManager.cs index efb5890..4979f2a 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/INamespaceManager.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/INamespaceManager.cs @@ -1,12 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; -using Microsoft.ServiceBus; +using Microsoft.ServiceBus.Messaging; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { - + /// /// Interface used to abstract the NamespaceManager /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusConfigurationFactory.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusConfigurationFactory.cs index 0f94fab..53e5b3b 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusConfigurationFactory.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusConfigurationFactory.cs @@ -1,13 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus; -using Microsoft.ServiceBus.Messaging; -using System.IO; +namespace ProjectExtensions.Azure.ServiceBus.Interfaces { -namespace ProjectExtensions.Azure.ServiceBus.Interfaces { - interface IServiceBusConfigurationFactory { IMessagingFactory MessageFactory { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusSetupConfiguration.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusSetupConfiguration.cs index 17aa50a..d5fc352 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusSetupConfiguration.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusSetupConfiguration.cs @@ -1,9 +1,7 @@ -using System; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Serialization; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusTokenProvider.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusTokenProvider.cs index 2c7f6ea..0a773a3 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusTokenProvider.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/IServiceBusTokenProvider.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus; +using Microsoft.ServiceBus; +using System; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { - + interface IServiceBusTokenProvider { - + TokenProvider TokenProvider { get; } diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ISubscriptionClient.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ISubscriptionClient.cs index 5af0a40..0904789 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ISubscriptionClient.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ISubscriptionClient.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; +using Microsoft.ServiceBus.Messaging; +using System; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { - + interface ISubscriptionClient { int PrefetchCount { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs index 0508f3c..2b89c42 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs @@ -1,11 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; namespace ProjectExtensions.Azure.ServiceBus.Interfaces { - + interface ITopicClient { IAsyncResult BeginSend(IBrokeredMessage message, AsyncCallback callback, object state); void EndSend(IAsyncResult result); diff --git a/src/ProjectExtensions.Azure.ServiceBus/MessageHandlerConfigurationAttribute.cs b/src/ProjectExtensions.Azure.ServiceBus/MessageHandlerConfigurationAttribute.cs index 46a0930..f1c9b5f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/MessageHandlerConfigurationAttribute.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/MessageHandlerConfigurationAttribute.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; +using System; +using System.Text; namespace ProjectExtensions.Azure.ServiceBus { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiver.cs b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiver.cs index c6fa5b0..36aee05 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiver.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiver.cs @@ -1,19 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using System.Threading.Tasks; -using System.IO; -using ProjectExtensions.Azure.ServiceBus.Serialization; -using System.Threading; -using System.Reflection; using NLog; -using Microsoft.Practices.TransientFaultHandling; -using System.Net; using ProjectExtensions.Azure.ServiceBus.Interfaces; -using ProjectExtensions.Azure.ServiceBus.Wrappers; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace ProjectExtensions.Azure.ServiceBus.Receiver { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiverState.cs b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiverState.cs index ab3da6c..df076ce 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiverState.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureBusReceiverState.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using System.Threading; -using Microsoft.ServiceBus.Messaging; -using ProjectExtensions.Azure.ServiceBus.Interfaces; namespace ProjectExtensions.Azure.ServiceBus.Receiver { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiveState.cs b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiveState.cs index 4d24171..803f90a 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiveState.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiveState.cs @@ -1,14 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Reflection; -using Microsoft.ServiceBus.Messaging; +using Microsoft.Practices.TransientFaultHandling; using ProjectExtensions.Azure.ServiceBus.Serialization; -using Microsoft.Practices.TransientFaultHandling; +using System.Reflection; namespace ProjectExtensions.Azure.ServiceBus.Receiver { - + class AzureReceiveState { public AzureReceiveState(AzureBusReceiverState data, MethodInfo methodInfo, diff --git a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiverHelper.cs b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiverHelper.cs index a7b81d5..73f61f9 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiverHelper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Receiver/AzureReceiverHelper.cs @@ -1,17 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Practices.TransientFaultHandling; +using Microsoft.Practices.TransientFaultHandling; +using Microsoft.ServiceBus.Messaging; using NLog; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Serialization; -using System.Threading; -using Microsoft.ServiceBus.Messaging; +using System; +using System.Collections.Generic; using System.IO; -using System.Diagnostics; -using ProjectExtensions.Azure.ServiceBus.TransientFaultHandling.ServiceBus; -using ProjectExtensions.Azure.ServiceBus.Interfaces; using System.Reflection; +using System.Threading; namespace ProjectExtensions.Azure.ServiceBus.Receiver { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Receiver/ReceivedMessage.cs b/src/ProjectExtensions.Azure.ServiceBus/Receiver/ReceivedMessage.cs index 3f95cfa..73e3661 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Receiver/ReceivedMessage.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Receiver/ReceivedMessage.cs @@ -1,9 +1,5 @@ -using System; +using Microsoft.Practices.TransientFaultHandling; using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; namespace ProjectExtensions.Azure.ServiceBus.Receiver { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs b/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs index 77e09e0..e316166 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs @@ -1,16 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using ProjectExtensions.Azure.ServiceBus.Serialization; using NLog; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Exceptions; +using ProjectExtensions.Azure.ServiceBus.Interfaces; +using ProjectExtensions.Azure.ServiceBus.Serialization; using System.Diagnostics; +using System.Collections.Generic; +using System; using System.Threading; -using ProjectExtensions.Azure.ServiceBus.Interfaces; -using ProjectExtensions.Azure.ServiceBus.Exceptions; namespace ProjectExtensions.Azure.ServiceBus.Sender { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Sender/MessageSentResult.cs b/src/ProjectExtensions.Azure.ServiceBus/Sender/MessageSentResult.cs index 27daa23..161e5cf 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Sender/MessageSentResult.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Sender/MessageSentResult.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ProjectExtensions.Azure.ServiceBus.Sender { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Serialization/IServiceBusSerializer.cs b/src/ProjectExtensions.Azure.ServiceBus/Serialization/IServiceBusSerializer.cs index 9c13f1a..3f0e4e2 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Serialization/IServiceBusSerializer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Serialization/IServiceBusSerializer.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Serialization { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Serialization/JsonServiceBusSerializer.cs b/src/ProjectExtensions.Azure.ServiceBus/Serialization/JsonServiceBusSerializer.cs index a1224b6..f720f72 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Serialization/JsonServiceBusSerializer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Serialization/JsonServiceBusSerializer.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using Newtonsoft.Json; +using Newtonsoft.Json; using NLog; +using System; +using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Serialization { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Serialization/ServiceBusSerializerBase.cs b/src/ProjectExtensions.Azure.ServiceBus/Serialization/ServiceBusSerializerBase.cs index fc2af10..1f1f537 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Serialization/ServiceBusSerializerBase.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Serialization/ServiceBusSerializerBase.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Serialization { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Serialization/XmlServiceBusSerializer.cs b/src/ProjectExtensions.Azure.ServiceBus/Serialization/XmlServiceBusSerializer.cs index 92f4bad..70daba1 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Serialization/XmlServiceBusSerializer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Serialization/XmlServiceBusSerializer.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NLog; +using NLog; +using System; using System.IO; -using System.Xml.Serialization; using System.Xml; +using System.Xml.Serialization; namespace ProjectExtensions.Azure.ServiceBus.Serialization { diff --git a/src/ProjectExtensions.Azure.ServiceBus/ServiceBusEnpointData.cs b/src/ProjectExtensions.Azure.ServiceBus/ServiceBusEnpointData.cs index 5531742..713e9b2 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ServiceBusEnpointData.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/ServiceBusEnpointData.cs @@ -1,10 +1,8 @@ -using System; -using System.Collections.Generic; +using ProjectExtensions.Azure.ServiceBus.Helpers; +using ProjectExtensions.Azure.ServiceBus.Receiver; +using System; using System.Linq; -using System.Text; using System.Reflection; -using ProjectExtensions.Azure.ServiceBus.Helpers; -using ProjectExtensions.Azure.ServiceBus.Receiver; namespace ProjectExtensions.Azure.ServiceBus { @@ -41,7 +39,7 @@ public string SubscriptionName { public string SubscriptionNameDebug { get { if (_subscriptionNameDebug == null) { - _subscriptionNameDebug = DeclaredType.FullName.Replace("`1", "") + "<" + MessageType.FullName + "> - " + SubscriptionName; + _subscriptionNameDebug = DeclaredType.FullName.Replace("`1", "") + "<" + MessageType.FullName + "> - " + SubscriptionName; } return _subscriptionNameDebug; } diff --git a/src/ProjectExtensions.Azure.ServiceBus/ServiceBusSetupConfiguration.cs b/src/ProjectExtensions.Azure.ServiceBus/ServiceBusSetupConfiguration.cs index 6f8e013..cc4abef 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ServiceBusSetupConfiguration.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/ServiceBusSetupConfiguration.cs @@ -1,10 +1,8 @@ -using System; +using ProjectExtensions.Azure.ServiceBus.Interfaces; +using ProjectExtensions.Azure.ServiceBus.Serialization; +using System; using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; -using ProjectExtensions.Azure.ServiceBus.Serialization; namespace ProjectExtensions.Azure.ServiceBus { @@ -82,7 +80,7 @@ public string ServiceBusIssuerKey { /// public string ServicePath { get; - set; + set; } /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/SingletonMessageHandlerAttribute.cs b/src/ProjectExtensions.Azure.ServiceBus/SingletonMessageHandlerAttribute.cs index 2ed5cbe..7c37ece 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/SingletonMessageHandlerAttribute.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/SingletonMessageHandlerAttribute.cs @@ -6,5 +6,5 @@ namespace ProjectExtensions.Azure.ServiceBus { /// [Obsolete("Use the Singleton property of MessageHandlerConfiguration", true)] [AttributeUsage(AttributeTargets.Class)] - public class SingletonMessageHandlerAttribute : Attribute {} + public class SingletonMessageHandlerAttribute : Attribute { } } \ No newline at end of file diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ExponentialBackoff.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ExponentialBackoff.cs index e0149f3..a6ed8b1 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ExponentialBackoff.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ExponentialBackoff.cs @@ -9,15 +9,13 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// /// A retry strategy with back-off parameters for calculating the exponential delay between retries. /// - public class ExponentialBackoff : RetryStrategy - { + public class ExponentialBackoff : RetryStrategy { private readonly int retryCount; private readonly TimeSpan minBackoff; private readonly TimeSpan maxBackoff; @@ -27,8 +25,7 @@ public class ExponentialBackoff : RetryStrategy /// Initializes a new instance of the class. /// public ExponentialBackoff() - : this(DefaultClientRetryCount, DefaultMinBackoff, DefaultMaxBackoff, DefaultClientBackoff) - { + : this(DefaultClientRetryCount, DefaultMinBackoff, DefaultMaxBackoff, DefaultClientBackoff) { } /// @@ -39,8 +36,7 @@ public ExponentialBackoff() /// The maximum back-off time. /// The value that will be used for calculating a random delta in the exponential delay between retries. public ExponentialBackoff(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) - : this(null, retryCount, minBackoff, maxBackoff, deltaBackoff, DefaultFirstFastRetry) - { + : this(null, retryCount, minBackoff, maxBackoff, deltaBackoff, DefaultFirstFastRetry) { } /// @@ -52,8 +48,7 @@ public ExponentialBackoff(int retryCount, TimeSpan minBackoff, TimeSpan maxBacko /// The maximum back-off time. /// The value that will be used for calculating a random delta in the exponential delay between retries. public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) - : this(name, retryCount, minBackoff, maxBackoff, deltaBackoff, DefaultFirstFastRetry) - { + : this(name, retryCount, minBackoff, maxBackoff, deltaBackoff, DefaultFirstFastRetry) { } /// @@ -69,8 +64,7 @@ public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, Time /// whereas the subsequent retries will remain subject to retry interval. /// public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff, bool firstFastRetry) - : base(name, firstFastRetry) - { + : base(name, firstFastRetry) { Guard.ArgumentNotNegativeValue(retryCount, "retryCount"); Guard.ArgumentNotNegativeValue(minBackoff.Ticks, "minBackoff"); Guard.ArgumentNotNegativeValue(maxBackoff.Ticks, "maxBackoff"); @@ -87,12 +81,9 @@ public ExponentialBackoff(string name, int retryCount, TimeSpan minBackoff, Time /// Returns the corresponding ShouldRetry delegate. /// /// The ShouldRetry delegate. - public override ShouldRetry GetShouldRetry() - { - return delegate(int currentRetryCount, Exception lastException, out TimeSpan retryInterval) - { - if (currentRetryCount < this.retryCount) - { + public override ShouldRetry GetShouldRetry() { + return delegate (int currentRetryCount, Exception lastException, out TimeSpan retryInterval) { + if (currentRetryCount < this.retryCount) { var random = new Random(); var delta = (int)((Math.Pow(2.0, currentRetryCount) - 1.0) * random.Next((int)(this.deltaBackoff.TotalMilliseconds * 0.8), (int)(this.deltaBackoff.TotalMilliseconds * 1.2))); diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/FixedInterval.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/FixedInterval.cs index bc12af3..f943611 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/FixedInterval.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/FixedInterval.cs @@ -9,15 +9,13 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// /// A RetryPolicy with a specified number of retry attempts and a default fixed time interval between retries. /// - public class FixedInterval : RetryStrategy - { + public class FixedInterval : RetryStrategy { private readonly int retryCount; private readonly TimeSpan retryInterval; @@ -25,8 +23,7 @@ public class FixedInterval : RetryStrategy /// Initializes a new instance of the class. /// public FixedInterval() - : this(DefaultClientRetryCount) - { + : this(DefaultClientRetryCount) { } /// @@ -34,8 +31,7 @@ public FixedInterval() /// /// The number of retry attempts. public FixedInterval(int retryCount) - : this(retryCount, DefaultRetryInterval) - { + : this(retryCount, DefaultRetryInterval) { } /// @@ -44,8 +40,7 @@ public FixedInterval(int retryCount) /// The number of retry attempts. /// The time interval between retries. public FixedInterval(int retryCount, TimeSpan retryInterval) - : this(null, retryCount, retryInterval, DefaultFirstFastRetry) - { + : this(null, retryCount, retryInterval, DefaultFirstFastRetry) { } /// @@ -55,8 +50,7 @@ public FixedInterval(int retryCount, TimeSpan retryInterval) /// The number of retry attempts. /// The time interval between retries. public FixedInterval(string name, int retryCount, TimeSpan retryInterval) - : this(name, retryCount, retryInterval, DefaultFirstFastRetry) - { + : this(name, retryCount, retryInterval, DefaultFirstFastRetry) { } /// @@ -67,8 +61,7 @@ public FixedInterval(string name, int retryCount, TimeSpan retryInterval) /// The time interval between retries. /// a value indicating whether or not the very first retry attempt will be made immediately whereas the subsequent retries will remain subject to retry interval. public FixedInterval(string name, int retryCount, TimeSpan retryInterval, bool firstFastRetry) - : base(name, firstFastRetry) - { + : base(name, firstFastRetry) { Guard.ArgumentNotNegativeValue(retryCount, "retryCount"); Guard.ArgumentNotNegativeValue(retryInterval.Ticks, "retryInterval"); @@ -80,21 +73,16 @@ public FixedInterval(string name, int retryCount, TimeSpan retryInterval, bool f /// Returns the corresponding ShouldRetry delegate. /// /// The ShouldRetry delegate. - public override ShouldRetry GetShouldRetry() - { - if (this.retryCount == 0) - { - return delegate(int currentRetryCount, Exception lastException, out TimeSpan interval) - { + public override ShouldRetry GetShouldRetry() { + if (this.retryCount == 0) { + return delegate (int currentRetryCount, Exception lastException, out TimeSpan interval) { interval = TimeSpan.Zero; return false; }; } - - return delegate(int currentRetryCount, Exception lastException, out TimeSpan interval) - { - if (currentRetryCount < this.retryCount) - { + + return delegate (int currentRetryCount, Exception lastException, out TimeSpan interval) { + if (currentRetryCount < this.retryCount) { interval = this.retryInterval; return true; } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Guard.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Guard.cs index f9520c6..83c7396 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Guard.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Guard.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { #region Using statements using System; using System.Globalization; @@ -21,8 +20,7 @@ namespace Microsoft.Practices.TransientFaultHandling /// /// Implements the common guard methods. /// - public static class Guard - { + public static class Guard { /// /// Checks a string argument to ensure it isn't null or empty. /// @@ -30,12 +28,10 @@ public static class Guard /// The name of the argument. /// The return value should be ignored. It is intended to be used only when validating arguments during instance creation (e.g. when calling base constructor). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Validated with method.")] - public static bool ArgumentNotNullOrEmptyString(string argumentValue, string argumentName) - { + public static bool ArgumentNotNullOrEmptyString(string argumentValue, string argumentName) { ArgumentNotNull(argumentValue, argumentName); - if (argumentValue.Length == 0) - { + if (argumentValue.Length == 0) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ExceptionMessages.StringCannotBeEmpty, argumentName)); } @@ -48,10 +44,8 @@ public static bool ArgumentNotNullOrEmptyString(string argumentValue, string arg /// The argument value to check. /// The name of the argument. /// /// The return value should be ignored. It is intended to be used only when validating arguments during instance creation (e.g. when calling base constructor). - public static bool ArgumentNotNull(object argumentValue, string argumentName) - { - if (argumentValue == null) - { + public static bool ArgumentNotNull(object argumentValue, string argumentName) { + if (argumentValue == null) { throw new ArgumentNullException(argumentName); } @@ -64,10 +58,8 @@ public static bool ArgumentNotNull(object argumentValue, string argumentName) /// The type of the argument. /// The value of the argument. /// The name of the argument for diagnostic purposes. - public static void ArgumentNotDefaultValue(T argumentValue, string argumentName) - { - if (!IsValueDefined(argumentValue)) - { + public static void ArgumentNotDefaultValue(T argumentValue, string argumentName) { + if (!IsValueDefined(argumentValue)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ExceptionMessages.ArgumentCannotBeDefault, argumentName)); } } @@ -77,10 +69,8 @@ public static void ArgumentNotDefaultValue(T argumentValue, string argumentNa /// /// The value of the argument. /// The name of the argument for diagnostic purposes. - public static void ArgumentNotZeroOrNegativeValue(int argumentValue, string argumentName) - { - if (argumentValue <= 0) - { + public static void ArgumentNotZeroOrNegativeValue(int argumentValue, string argumentName) { + if (argumentValue <= 0) { throw new ArgumentOutOfRangeException(argumentName, argumentValue, string.Format(CultureInfo.CurrentCulture, ExceptionMessages.ArgumentCannotBeZeroOrNegative, argumentName)); } } @@ -90,10 +80,8 @@ public static void ArgumentNotZeroOrNegativeValue(int argumentValue, string argu /// /// The value of the argument. /// The name of the argument for diagnostic purposes. - public static void ArgumentNotNegativeValue(int argumentValue, string argumentName) - { - if (argumentValue < 0) - { + public static void ArgumentNotNegativeValue(int argumentValue, string argumentName) { + if (argumentValue < 0) { throw new ArgumentOutOfRangeException(argumentName, argumentValue, string.Format(CultureInfo.CurrentCulture, ExceptionMessages.ArgumentCannotBeNegative, argumentName)); } } @@ -103,10 +91,8 @@ public static void ArgumentNotNegativeValue(int argumentValue, string argumentNa /// /// The value of the argument. /// The name of the argument for diagnostic purposes. - public static void ArgumentNotNegativeValue(long argumentValue, string argumentName) - { - if (argumentValue < 0) - { + public static void ArgumentNotNegativeValue(long argumentValue, string argumentName) { + if (argumentValue < 0) { throw new ArgumentOutOfRangeException(argumentName, argumentValue, string.Format(CultureInfo.CurrentCulture, ExceptionMessages.ArgumentCannotBeNegative, argumentName)); } } @@ -117,10 +103,8 @@ public static void ArgumentNotNegativeValue(long argumentValue, string argumentN /// The value of the argument. /// The ceiling value of the argument. /// The name of the argument for diagnostic purposes. - public static void ArgumentNotGreaterThan(double argumentValue, double ceilingValue, string argumentName) - { - if (argumentValue > ceilingValue) - { + public static void ArgumentNotGreaterThan(double argumentValue, double ceilingValue, string argumentName) { + if (argumentValue > ceilingValue) { throw new ArgumentOutOfRangeException(argumentName, argumentValue, string.Format(CultureInfo.CurrentCulture, ExceptionMessages.ArgumentCannotBeGreaterThanBaseline, argumentName, ceilingValue)); } } @@ -131,10 +115,8 @@ public static void ArgumentNotGreaterThan(double argumentValue, double ceilingVa /// The Enum type the value should correspond to. /// The value to check for. /// The name of the argument holding the value. - public static void EnumValueIsDefined(Type enumType, object value, string argumentName) - { - if (Enum.IsDefined(enumType, value) == false) - { + public static void EnumValueIsDefined(Type enumType, object value, string argumentName) { + if (Enum.IsDefined(enumType, value) == false) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ExceptionMessages.InvalidEnumValue, argumentName, enumType)); } } @@ -146,10 +128,8 @@ public static void EnumValueIsDefined(Type enumType, object value, string argume /// The argument type. /// The type it must be assignable from. /// The argument name. - public static void TypeIsAssignableFromType(Type assignee, Type providedType, string argumentName) - { - if (providedType != null && !providedType.IsAssignableFrom(assignee)) - { + public static void TypeIsAssignableFromType(Type assignee, Type providedType, string argumentName) { + if (providedType != null && !providedType.IsAssignableFrom(assignee)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ExceptionMessages.TypeNotCompatible, assignee, providedType), argumentName); } } @@ -161,14 +141,11 @@ public static void TypeIsAssignableFromType(Type assignee, Type providedType, st /// The type of the value to be checked. /// The value to be checked. /// True if the value is defined or false if it's null or represents a default value for its type. - private static bool IsValueDefined(T value) - { - if (typeof(T).IsValueType) - { + private static bool IsValueDefined(T value) { + if (typeof(T).IsValueType) { return !value.Equals(default(T)); } - else - { + else { return value != null; } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ITransientErrorDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ITransientErrorDetectionStrategy.cs index 31cb1e1..f0f8185 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ITransientErrorDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/ITransientErrorDetectionStrategy.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { #region Using statements using System; #endregion @@ -18,8 +17,7 @@ namespace Microsoft.Practices.TransientFaultHandling /// /// Defines an interface which must be implemented by custom components responsible for detecting specific transient conditions. /// - public interface ITransientErrorDetectionStrategy - { + public interface ITransientErrorDetectionStrategy { /// /// Determines whether the specified exception represents a transient failure that can be compensated by a retry. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Incremental.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Incremental.cs index f0cb96f..c77963d 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Incremental.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/Incremental.cs @@ -9,15 +9,13 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// /// A RetryPolicy with a specified number of retry attempts and an incremental time interval between retries. /// - public class Incremental : RetryStrategy - { + public class Incremental : RetryStrategy { private readonly int retryCount; private readonly TimeSpan initialInterval; private readonly TimeSpan increment; @@ -26,8 +24,7 @@ public class Incremental : RetryStrategy /// Initializes a new instance of the class. /// public Incremental() - : this(DefaultClientRetryCount, DefaultRetryInterval, DefaultRetryIncrement) - { + : this(DefaultClientRetryCount, DefaultRetryInterval, DefaultRetryIncrement) { } /// @@ -37,8 +34,7 @@ public Incremental() /// The initial interval that will apply for the first retry. /// The incremental time value that will be used for calculating the progressive delay between retries. public Incremental(int retryCount, TimeSpan initialInterval, TimeSpan increment) - : this(null, retryCount, initialInterval, increment) - { + : this(null, retryCount, initialInterval, increment) { } /// @@ -49,8 +45,7 @@ public Incremental(int retryCount, TimeSpan initialInterval, TimeSpan increment) /// The initial interval that will apply for the first retry. /// The incremental time value that will be used for calculating the progressive delay between retries. public Incremental(string name, int retryCount, TimeSpan initialInterval, TimeSpan increment) - : this(name, retryCount, initialInterval, increment, DefaultFirstFastRetry) - { + : this(name, retryCount, initialInterval, increment, DefaultFirstFastRetry) { } /// @@ -62,8 +57,7 @@ public Incremental(string name, int retryCount, TimeSpan initialInterval, TimeSp /// The incremental time value that will be used for calculating the progressive delay between retries. /// a value indicating whether or not the very first retry attempt will be made immediately whereas the subsequent retries will remain subject to retry interval. public Incremental(string name, int retryCount, TimeSpan initialInterval, TimeSpan increment, bool firstFastRetry) - : base(name, firstFastRetry) - { + : base(name, firstFastRetry) { Guard.ArgumentNotNegativeValue(retryCount, "retryCount"); Guard.ArgumentNotNegativeValue(initialInterval.Ticks, "initialInterval"); Guard.ArgumentNotNegativeValue(increment.Ticks, "increment"); @@ -77,12 +71,9 @@ public Incremental(string name, int retryCount, TimeSpan initialInterval, TimeSp /// Returns the corresponding ShouldRetry delegate. /// /// The ShouldRetry delegate. - public override ShouldRetry GetShouldRetry() - { - return delegate(int currentRetryCount, Exception lastException, out TimeSpan retryInterval) - { - if (currentRetryCount < this.retryCount) - { + public override ShouldRetry GetShouldRetry() { + return delegate (int currentRetryCount, Exception lastException, out TimeSpan retryInterval) { + if (currentRetryCount < this.retryCount) { retryInterval = TimeSpan.FromMilliseconds(this.initialInterval.TotalMilliseconds + (this.increment.TotalMilliseconds * currentRetryCount)); return true; diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryLimitExceededException.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryLimitExceededException.cs index c6ffa9f..650e0e4 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryLimitExceededException.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryLimitExceededException.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { #region Using references using System; using System.Runtime.Serialization; @@ -22,14 +21,12 @@ namespace Microsoft.Practices.TransientFaultHandling /// exception to notify the retry policy that no further retry attempts are required. /// [Serializable] - public sealed class RetryLimitExceededException : Exception - { + public sealed class RetryLimitExceededException : Exception { /// /// Initializes a new instance of the class with a default error message. /// public RetryLimitExceededException() - : this(ExceptionMessages.RetryLimitExceeded) - { + : this(ExceptionMessages.RetryLimitExceeded) { } /// @@ -37,8 +34,7 @@ public RetryLimitExceededException() /// /// The message that describes the error. public RetryLimitExceededException(string message) - : base(message) - { + : base(message) { } /// @@ -47,8 +43,7 @@ public RetryLimitExceededException(string message) /// /// The exception that is the cause of the current exception. public RetryLimitExceededException(Exception innerException) - : base(innerException != null ? innerException.Message : ExceptionMessages.RetryLimitExceeded, innerException) - { + : base(innerException != null ? innerException.Message : ExceptionMessages.RetryLimitExceeded, innerException) { } /// @@ -57,8 +52,7 @@ public RetryLimitExceededException(Exception innerException) /// The message that describes the error. /// The exception that is the cause of the current exception. public RetryLimitExceededException(string message, Exception innerException) - : base(message, innerException) - { + : base(message, innerException) { } /// @@ -69,8 +63,7 @@ public RetryLimitExceededException(string message, Exception innerException) /// The parameter is null. /// The class name is null or is zero (0). private RetryLimitExceededException(SerializationInfo info, StreamingContext context) - : base(info, context) - { + : base(info, context) { } } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.Generic.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.Generic.cs index 920710b..b8092e3 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.Generic.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.Generic.cs @@ -9,23 +9,20 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// /// Provides a generic version of the class. /// /// The type implementing the interface that is responsible for detecting transient conditions. - public class RetryPolicy : RetryPolicy where T : ITransientErrorDetectionStrategy, new() - { + public class RetryPolicy : RetryPolicy where T : ITransientErrorDetectionStrategy, new() { /// /// Initializes a new instance of the RetryPolicy class with the specified number of retry attempts and parameters defining the progressive delay between retries. /// /// The retry strategy to use for this retry policy. public RetryPolicy(RetryStrategy retryStrategy) - : base(new T(), retryStrategy) - { + : base(new T(), retryStrategy) { } /// @@ -33,8 +30,7 @@ public RetryPolicy(RetryStrategy retryStrategy) /// /// The number of retry attempts. public RetryPolicy(int retryCount) - : base(new T(), retryCount) - { + : base(new T(), retryCount) { } /// @@ -43,8 +39,7 @@ public RetryPolicy(int retryCount) /// The number of retry attempts. /// The interval between retries. public RetryPolicy(int retryCount, TimeSpan retryInterval) - : base(new T(), retryCount, retryInterval) - { + : base(new T(), retryCount, retryInterval) { } /// @@ -55,8 +50,7 @@ public RetryPolicy(int retryCount, TimeSpan retryInterval) /// The maximum back-off time. /// The time value that will be used for calculating a random delta in the exponential delay between retries. public RetryPolicy(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) - : base(new T(), retryCount, minBackoff, maxBackoff, deltaBackoff) - { + : base(new T(), retryCount, minBackoff, maxBackoff, deltaBackoff) { } /// @@ -66,8 +60,7 @@ public RetryPolicy(int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, Tim /// The initial interval that will apply for the first retry. /// The incremental time value that will be used for calculating the progressive delay between retries. public RetryPolicy(int retryCount, TimeSpan initialInterval, TimeSpan increment) - : base(new T(), retryCount, initialInterval, increment) - { + : base(new T(), retryCount, initialInterval, increment) { } } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.cs index 79dc9b3..0f25acd 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryPolicy.cs @@ -9,16 +9,14 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; using System.Threading; /// /// Provides the base implementation of the retry mechanism for unreliable actions and transient conditions. /// - public class RetryPolicy - { + public class RetryPolicy { /// /// Returns a default policy that does no retries, it just invokes action exactly once. /// @@ -47,15 +45,13 @@ public class RetryPolicy /// /// The that is responsible for detecting transient conditions. /// The retry strategy to use for this retry policy. - public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, RetryStrategy retryStrategy) - { + public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, RetryStrategy retryStrategy) { Guard.ArgumentNotNull(errorDetectionStrategy, "errorDetectionStrategy"); Guard.ArgumentNotNull(retryStrategy, "retryPolicy"); this.ErrorDetectionStrategy = errorDetectionStrategy; - if (errorDetectionStrategy == null) - { + if (errorDetectionStrategy == null) { throw new InvalidOperationException("The error detection strategy type must implement the ITransientErrorDetectionStrategy interface."); } @@ -68,8 +64,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, Retr /// The that is responsible for detecting transient conditions. /// The number of retry attempts. public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount) - : this(errorDetectionStrategy, new FixedInterval(retryCount)) - { + : this(errorDetectionStrategy, new FixedInterval(retryCount)) { } /// @@ -79,8 +74,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int /// The number of retry attempts. /// The interval between retries. public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan retryInterval) - : this(errorDetectionStrategy, new FixedInterval(retryCount, retryInterval)) - { + : this(errorDetectionStrategy, new FixedInterval(retryCount, retryInterval)) { } /// @@ -92,8 +86,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int /// The maximum back-off time. /// The time value that will be used for calculating a random delta in the exponential delay between retries. public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff) - : this(errorDetectionStrategy, new ExponentialBackoff(retryCount, minBackoff, maxBackoff, deltaBackoff)) - { + : this(errorDetectionStrategy, new ExponentialBackoff(retryCount, minBackoff, maxBackoff, deltaBackoff)) { } /// @@ -104,8 +97,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int /// The initial interval that will apply for the first retry. /// The incremental time value that will be used for calculating the progressive delay between retries. public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan initialInterval, TimeSpan increment) - : this(errorDetectionStrategy, new Incremental(retryCount, initialInterval, increment)) - { + : this(errorDetectionStrategy, new Incremental(retryCount, initialInterval, increment)) { } /// @@ -127,8 +119,7 @@ public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int /// Repetitively executes the specified action while it satisfies the current retry policy. /// /// A delegate representing the executable action which doesn't return any results. - public virtual void ExecuteAction(Action action) - { + public virtual void ExecuteAction(Action action) { Guard.ArgumentNotNull(action, "action"); this.ExecuteAction(() => { action(); return default(object); }); @@ -141,8 +132,7 @@ public virtual void ExecuteAction(Action action) /// A delegate representing the executable action which returns the result of type R. /// The result from the action. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0", Justification = "Validated with Guard")] - public virtual TResult ExecuteAction(Func func) - { + public virtual TResult ExecuteAction(Func func) { Guard.ArgumentNotNull(func, "func"); int retryCount = 0; @@ -151,49 +141,41 @@ public virtual TResult ExecuteAction(Func func) var shouldRetry = this.RetryStrategy.GetShouldRetry(); - for (;;) + for (; ; ) { lastError = null; - try - { + try { return func(); } - catch (RetryLimitExceededException limitExceededEx) - { + catch (RetryLimitExceededException limitExceededEx) { // The user code can throw a RetryLimitExceededException to force the exit from the retry loop. // The RetryLimitExceeded exception can have an inner exception attached to it. This is the exception // which we will have to throw up the stack so that callers can handle it. - if (limitExceededEx.InnerException != null) - { + if (limitExceededEx.InnerException != null) { throw limitExceededEx.InnerException; } - else - { + else { return default(TResult); } } - catch (Exception ex) - { + catch (Exception ex) { lastError = ex; - if (!(this.ErrorDetectionStrategy.IsTransient(lastError) && shouldRetry(retryCount++, lastError, out delay))) - { + if (!(this.ErrorDetectionStrategy.IsTransient(lastError) && shouldRetry(retryCount++, lastError, out delay))) { throw; } } // Perform an extra check in the delay interval. Should prevent from accidentally ending up with the value of -1 that will block a thread indefinitely. // In addition, any other negative numbers will cause an ArgumentOutOfRangeException fault that will be thrown by Thread.Sleep. - if (delay.TotalMilliseconds < 0) - { + if (delay.TotalMilliseconds < 0) { delay = TimeSpan.Zero; } this.OnRetrying(retryCount, lastError, delay); - if (retryCount > 1 || !this.RetryStrategy.FastFirstRetry) - { + if (retryCount > 1 || !this.RetryStrategy.FastFirstRetry) { Thread.Sleep(delay); } } @@ -206,8 +188,7 @@ public virtual TResult ExecuteAction(Func func) /// The end method of the async pattern. /// The action to perform when the async operation is done. /// The fault handler delegate that will be triggered if the operation cannot be successfully invoked despite retry attempts. - public virtual void ExecuteAction(Action beginAction, Action endAction, Action successHandler, Action faultHandler) - { + public virtual void ExecuteAction(Action beginAction, Action endAction, Action successHandler, Action faultHandler) { Guard.ArgumentNotNull(endAction, "endAction"); successHandler = successHandler ?? (() => { }); @@ -227,8 +208,7 @@ public virtual void ExecuteAction(Action beginAction, ActionThe action to perform when the async operation is done. /// The fault handler delegate that will be triggered if the operation cannot be successfully invoked despite retry attempts. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Needs to catch all exceptions to test them.")] - public virtual void ExecuteAction(Action beginAction, Func endAction, Action successHandler, Action faultHandler) - { + public virtual void ExecuteAction(Action beginAction, Func endAction, Action successHandler, Action faultHandler) { Guard.ArgumentNotNull(beginAction, "beginAction"); Guard.ArgumentNotNull(endAction, "endAction"); successHandler = successHandler ?? (_ => { }); @@ -242,12 +222,10 @@ public virtual void ExecuteAction(Action beginAction, Fu // Configure a custom callback delegate that invokes the end operation and the success handler if the operation succeedes endInvoke = - ar => - { + ar => { var result = default(TResult); - if (executeWithRetry(() => result = endAction(ar))) - { + if (executeWithRetry(() => result = endAction(ar))) { successHandler(result); } }; @@ -256,42 +234,33 @@ public virtual void ExecuteAction(Action beginAction, Fu // If the action succeeds (i.e. does not throw an exception) it returns true. // If the action throws, it analizes it for retries. If a retry is required, it restarts the async operation; otherwise, it invokes the fault handler. executeWithRetry = - a => - { - try - { + a => { + try { // Invoke the callback delegate which can throw an exception if the main async operation has completed with a fault. a(); return true; } - catch (Exception ex) - { + catch (Exception ex) { // Capture the original exception for analysis. var lastError = ex; // Handling of RetryLimitExceededException needs to be done separately. This exception type indicates the application's intent to exit from the retry loop. - if (lastError is RetryLimitExceededException) - { - if (lastError.InnerException != null) - { + if (lastError is RetryLimitExceededException) { + if (lastError.InnerException != null) { faultHandler(lastError.InnerException); } - else - { + else { faultHandler(lastError); } } - else - { + else { var delay = TimeSpan.Zero; // Check if we should continue retrying on this exception. If not, invoke the fault handler so that user code can take control. - if (!(this.ErrorDetectionStrategy.IsTransient(lastError) && shouldRetry(retryCount++, lastError, out delay))) - { + if (!(this.ErrorDetectionStrategy.IsTransient(lastError) && shouldRetry(retryCount++, lastError, out delay))) { faultHandler(lastError); } - else - { + else { // Perform an extra check in the delay interval. Should prevent from accidentally ending up with the value of -1 that will block a thread indefinitely. // In addition, any other negative numbers will cause an ArgumentOutOfRangeException fault that will be thrown by Thread.Sleep. @@ -303,8 +272,7 @@ public virtual void ExecuteAction(Action beginAction, Fu this.OnRetrying(retryCount, lastError, delay); // Sleep for the defined interval before repetitively executing the main async operation. - if (retryCount > 1 || !this.RetryStrategy.FastFirstRetry) - { + if (retryCount > 1 || !this.RetryStrategy.FastFirstRetry) { Thread.Sleep(delay); } @@ -326,10 +294,8 @@ public virtual void ExecuteAction(Action beginAction, Fu /// The current retry attempt count. /// The exception which caused the retry conditions to occur. /// The delay indicating how long the current thread will be suspended for before the next iteration will be invoked. - protected virtual void OnRetrying(int retryCount, Exception lastError, TimeSpan delay) - { - if (this.Retrying != null) - { + protected virtual void OnRetrying(int retryCount, Exception lastError, TimeSpan delay) { + if (this.Retrying != null) { this.Retrying(this, new RetryingEventArgs(retryCount, delay, lastError)); } } @@ -339,15 +305,13 @@ protected virtual void OnRetrying(int retryCount, Exception lastError, TimeSpan /// Implements a strategy that ignores any transient errors. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Instantiated through generics")] - private sealed class TransientErrorIgnoreStrategy : ITransientErrorDetectionStrategy - { + private sealed class TransientErrorIgnoreStrategy : ITransientErrorDetectionStrategy { /// /// Always return false. /// /// The exception. /// Returns false. - public bool IsTransient(Exception ex) - { + public bool IsTransient(Exception ex) { return false; } } @@ -356,15 +320,13 @@ public bool IsTransient(Exception ex) /// Implements a strategy that treats all exceptions as transient errors. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses", Justification = "Instantiated through generics")] - private sealed class TransientErrorCatchAllStrategy : ITransientErrorDetectionStrategy - { + private sealed class TransientErrorCatchAllStrategy : ITransientErrorDetectionStrategy { /// /// Always return true. /// /// The exception. /// Returns true. - public bool IsTransient(Exception ex) - { + public bool IsTransient(Exception ex) { return true; } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryStrategy.cs index 92b7cc4..afa0a22 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryStrategy.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// @@ -25,8 +24,7 @@ namespace Microsoft.Practices.TransientFaultHandling /// /// Base Abstract RetryStrategy /// - public abstract class RetryStrategy - { + public abstract class RetryStrategy { #region Public members /// /// The default number of retry attempts. @@ -105,8 +103,7 @@ public abstract class RetryStrategy /// The name of the retry strategy. /// a value indicating whether or not the very first retry attempt will be made immediately /// whereas the subsequent retries will remain subject to retry interval. - protected RetryStrategy(string name, bool firstFastRetry) - { + protected RetryStrategy(string name, bool firstFastRetry) { this.Name = name; this.FastFirstRetry = firstFastRetry; } @@ -116,7 +113,7 @@ protected RetryStrategy(string name, bool firstFastRetry) /// whereas the subsequent retries will remain subject to retry interval. /// public bool FastFirstRetry { get; set; } - + /// /// Gets the name of the retry strategy. /// diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryingEventArgs.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryingEventArgs.cs index 45b11bc..e713352 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryingEventArgs.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling.Core/RetryingEventArgs.cs @@ -9,23 +9,20 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.TransientFaultHandling -{ +namespace Microsoft.Practices.TransientFaultHandling { using System; /// /// Contains information required for the event. /// - public class RetryingEventArgs : EventArgs - { + public class RetryingEventArgs : EventArgs { /// /// Initializes a new instance of the class. /// /// The current retry attempt count. /// The delay indicating how long the current thread will be suspended for before the next iteration will be invoked. /// The exception which caused the retry conditions to occur. - public RetryingEventArgs(int currentRetryCount, TimeSpan delay, Exception lastException) - { + public RetryingEventArgs(int currentRetryCount, TimeSpan delay, Exception lastException) { Guard.ArgumentNotNull(lastException, "lastException"); this.CurrentRetryCount = currentRetryCount; diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/AzureStorageExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/AzureStorageExtensions.cs index d61826b..5d2da23 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/AzureStorageExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/AzureStorageExtensions.cs @@ -9,38 +9,32 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.AzureStorage -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.AzureStorage { using Microsoft.Practices.TransientFaultHandling; /// /// Extends the RetryStrategy to allow using the retry strategies from the Transient Fault Handling Application Block with Windows Azure Store. /// - public static class AzureStorageExtensions - { + public static class AzureStorageExtensions { /// /// Wrap a Transient Fault Handling Application Block retry strategy into a Microsoft.WindowsAzure.StorageClient.RetryPolicy. /// /// The Transient Fault Handling Application Block retry strategy to wrap. /// Returns a wrapped Transient Fault Handling Application Block retry strategy into a Microsoft.WindowsAzure.StorageClient.RetryPolicy. - public static Microsoft.WindowsAzure.StorageClient.RetryPolicy AsAzureStorageClientRetryPolicy(this RetryStrategy retryStrategy) - { + public static Microsoft.WindowsAzure.StorageClient.RetryPolicy AsAzureStorageClientRetryPolicy(this RetryStrategy retryStrategy) { Guard.ArgumentNotNull(retryStrategy, "retryStrategy"); return () => new ShouldRetryWrapper(retryStrategy.GetShouldRetry()).ShouldRetry; } - private class ShouldRetryWrapper - { + private class ShouldRetryWrapper { private readonly ShouldRetry shouldRetry; - public ShouldRetryWrapper(ShouldRetry shouldRetry) - { + public ShouldRetryWrapper(ShouldRetry shouldRetry) { this.shouldRetry = shouldRetry; } - public bool ShouldRetry(int retryCount, System.Exception lastException, out System.TimeSpan delay) - { + public bool ShouldRetry(int retryCount, System.Exception lastException, out System.TimeSpan delay) { return this.shouldRetry(retryCount, lastException, out delay); } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs index 55b0621..9f3b435 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs @@ -9,83 +9,69 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.AzureStorage -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.AzureStorage { #region Using references + using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Properties; + using Microsoft.Practices.TransientFaultHandling; + using Microsoft.WindowsAzure.StorageClient; using System; using System.Data.Services.Client; using System.Linq; using System.Net; using System.Text.RegularExpressions; - using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Properties; - using Microsoft.Practices.TransientFaultHandling; - using Microsoft.WindowsAzure.StorageClient; - #endregion /// /// Provides the transient error detection logic that can recognize transient faults when dealing with Windows Azure storage services. /// - public class StorageTransientErrorDetectionStrategy : ITransientErrorDetectionStrategy - { + public class StorageTransientErrorDetectionStrategy : ITransientErrorDetectionStrategy { /// /// Determines whether the specified exception represents a transient failure that can be compensated by a retry. /// /// The exception object to be verified. /// True if the specified exception is considered as transient, otherwise false. - public bool IsTransient(Exception ex) - { + public bool IsTransient(Exception ex) { return ex != null && (CheckIsTransient(ex) || (ex.InnerException != null && CheckIsTransient(ex.InnerException))); } - private static bool CheckIsTransient(Exception ex) - { + private static bool CheckIsTransient(Exception ex) { var webException = ex as WebException; - if (webException != null && (webException.Status == WebExceptionStatus.ProtocolError || webException.Status == WebExceptionStatus.ConnectionClosed)) - { + if (webException != null && (webException.Status == WebExceptionStatus.ProtocolError || webException.Status == WebExceptionStatus.ConnectionClosed)) { return true; } var dataServiceException = ex as DataServiceRequestException; - if (dataServiceException != null) - { - if (IsErrorStringMatch(GetErrorCode(dataServiceException), StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut, TableErrorCodeStrings.TableServerOutOfMemory)) - { + if (dataServiceException != null) { + if (IsErrorStringMatch(GetErrorCode(dataServiceException), StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut, TableErrorCodeStrings.TableServerOutOfMemory)) { return true; } } var serverException = ex as StorageServerException; - if (serverException != null) - { - if (IsErrorCodeMatch(serverException, StorageErrorCode.ServiceInternalError, StorageErrorCode.ServiceTimeout)) - { + if (serverException != null) { + if (IsErrorCodeMatch(serverException, StorageErrorCode.ServiceInternalError, StorageErrorCode.ServiceTimeout)) { return true; } - if (IsErrorStringMatch(serverException, StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut)) - { + if (IsErrorStringMatch(serverException, StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut)) { return true; } } var storageException = ex as StorageClientException; - if (storageException != null) - { - if (IsErrorStringMatch(storageException, StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, TableErrorCodeStrings.TableServerOutOfMemory)) - { + if (storageException != null) { + if (IsErrorStringMatch(storageException, StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, TableErrorCodeStrings.TableServerOutOfMemory)) { return true; } } - if (ex is TimeoutException) - { + if (ex is TimeoutException) { return true; } @@ -93,33 +79,27 @@ private static bool CheckIsTransient(Exception ex) } #region Private members - private static string GetErrorCode(DataServiceRequestException ex) - { - if (ex != null && ex.InnerException != null) - { + private static string GetErrorCode(DataServiceRequestException ex) { + if (ex != null && ex.InnerException != null) { var regEx = new Regex(Resources.GetErrorCodeRegEx, RegexOptions.IgnoreCase); var match = regEx.Match(ex.InnerException.Message); return match.Groups[1].Value; } - else - { + else { return null; } } - private static bool IsErrorCodeMatch(StorageException ex, params StorageErrorCode[] codes) - { + private static bool IsErrorCodeMatch(StorageException ex, params StorageErrorCode[] codes) { return ex != null && codes.Contains(ex.ErrorCode); } - private static bool IsErrorStringMatch(StorageException ex, params string[] errorStrings) - { + private static bool IsErrorStringMatch(StorageException ex, params string[] errorStrings) { return ex != null && ex.ExtendedErrorInformation != null && errorStrings.Contains(ex.ExtendedErrorInformation.ErrorCode); } - private static bool IsErrorStringMatch(string exceptionErrorString, params string[] errorStrings) - { + private static bool IsErrorStringMatch(string exceptionErrorString, params string[] errorStrings) { return errorStrings.Contains(exceptionErrorString); } #endregion diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/Configuration/TransientFaultHandlingDesignTime.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/Configuration/TransientFaultHandlingDesignTime.cs index 3c45460..9abb79f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/Configuration/TransientFaultHandlingDesignTime.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/Configuration/TransientFaultHandlingDesignTime.cs @@ -9,12 +9,9 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration -{ - internal static class TransientFaultHandlingDesignTime - { - public static class ViewModelTypeNames - { +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration { + internal static class TransientFaultHandlingDesignTime { + public static class ViewModelTypeNames { public const string RetryPolicyConfigurationSettingsViewModel = "Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.Design.ViewModel.RetryPolicyConfigurationSettingsViewModel, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration"; @@ -25,16 +22,14 @@ public static class ViewModelTypeNames "Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.Design.ViewModel.TimeSpanElementConfigurationProperty, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration"; } - public static class CommandTypeNames - { + public static class CommandTypeNames { public const string WellKnownRetryStrategyElementCollectionCommand = "Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.Design.ViewModel.Commands.WellKnownRetryStrategyElementCollectionCommand, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration"; } /// /// Class that contains common editor types used by the designtime. /// - public static class EditorTypes - { + public static class EditorTypes { /// /// Type name of the TimeSpanEditor class, declared in the Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Configuration Assembly. /// @@ -46,8 +41,7 @@ public static class EditorTypes public const string FrameworkElement = "System.Windows.FrameworkElement, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; } - public static class ValidatorTypes - { + public static class ValidatorTypes { public const string NameValueCollectionValidator = "Microsoft.Practices.EnterpriseLibrary.Configuration.Design.Validation.NameValueCollectionValidator, Microsoft.Practices.EnterpriseLibrary.Configuration.DesignTime"; public const string ExponentialBackoffValidator = "Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration.Validation.ExponentialBackoffValidator, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Configuration"; diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ExtensionMethods.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ExtensionMethods.cs index 9da3ac2..90b49b2 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ExtensionMethods.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ExtensionMethods.cs @@ -9,17 +9,15 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling { #region Using statements using System; #endregion - + /// /// Provides a set of extension methods that supplement various .NET Framework classes with value-add functionality. /// - public static class ExtensionMethods - { + public static class ExtensionMethods { /// /// Verifies whether the specified exception object contains an inner exception of the specified type . /// @@ -27,15 +25,12 @@ public static class ExtensionMethods /// The exception object to be inspected. /// The instance of the inner exception of the specified type if found, otherwise null. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "As designed")] - public static Exception GetInnerException(this Exception ex) - { + public static Exception GetInnerException(this Exception ex) { var innerEx = ex != null ? ex.InnerException : null; var exceptionType = typeof(T); - while (innerEx != null) - { - if (exceptionType.IsAssignableFrom(innerEx.GetType())) - { + while (innerEx != null) { + if (exceptionType.IsAssignableFrom(innerEx.GetType())) { return innerEx; } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManager.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManager.cs index 37e2fda..fcc6d63 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManager.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManager.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling { using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.AzureStorage; using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus; using Microsoft.Practices.TransientFaultHandling; @@ -18,8 +17,7 @@ namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandl /// /// Non-static entry point to the retry functionality. /// - public abstract class RetryManager - { + public abstract class RetryManager { /// /// Initializes a new instance of the class. /// @@ -29,8 +27,7 @@ public abstract class RetryManager /// The default retry strategy for Windows Azure Service Bus. /// The default retry strategy for Windows Azure Caching. /// The default retry strategy for Windows Azure Storage. - protected RetryManager(string defaultRetryStrategyName, string defaultSqlConnectionStrategyName, string defaultSqlCommandStrategyName, string defaultAzureServiceBusStrategyName, string defaultAzureCachingStrategyName, string defaultAzureStorageStrategyName) - { + protected RetryManager(string defaultRetryStrategyName, string defaultSqlConnectionStrategyName, string defaultSqlCommandStrategyName, string defaultAzureServiceBusStrategyName, string defaultAzureCachingStrategyName, string defaultAzureStorageStrategyName) { this.DefaultRetryStrategyName = defaultRetryStrategyName; this.DefaultSqlConnectionStrategyName = string.IsNullOrEmpty(defaultSqlConnectionStrategyName) ? this.DefaultRetryStrategyName : defaultSqlConnectionStrategyName; this.DefaultSqlCommandStrategyName = string.IsNullOrEmpty(defaultSqlCommandStrategyName) ? this.DefaultRetryStrategyName : defaultSqlCommandStrategyName; @@ -75,8 +72,7 @@ protected RetryManager(string defaultRetryStrategyName, string defaultSqlConnect /// The type implementing the interface that is responsible for detecting transient conditions. /// A new retry policy with the specified error detection strategy and the default retry strategy defined in the config public virtual RetryPolicy GetRetryPolicy() - where T : ITransientErrorDetectionStrategy, new() - { + where T : ITransientErrorDetectionStrategy, new() { return new RetryPolicy(this.GetRetryStrategy()); } @@ -87,8 +83,7 @@ public virtual RetryPolicy GetRetryPolicy() /// The retry strategy name as defined in the config. /// A new retry policy with the specified error detection strategy and the default retry strategy defined in the config public virtual RetryPolicy GetRetryPolicy(string retryStrategyName) - where T : ITransientErrorDetectionStrategy, new() - { + where T : ITransientErrorDetectionStrategy, new() { return new RetryPolicy(this.GetRetryStrategy(retryStrategyName)); } @@ -96,8 +91,7 @@ public virtual RetryPolicy GetRetryPolicy(string retryStrategyName) /// Return the default retry strategy defined in the config. /// /// The retry strategy matching the default strategy. - public RetryStrategy GetRetryStrategy() - { + public RetryStrategy GetRetryStrategy() { return this.GetRetryStrategy(this.DefaultRetryStrategyName); } @@ -113,8 +107,7 @@ public RetryStrategy GetRetryStrategy() /// /// The default SqlConnection retry strategy (or the default strategy if no default could be found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public RetryStrategy GetDefaultSqlConnectionRetryStrategy() - { + public RetryStrategy GetDefaultSqlConnectionRetryStrategy() { return GetRetryStrategy(this.DefaultSqlConnectionStrategyName); } @@ -123,8 +116,7 @@ public RetryStrategy GetDefaultSqlConnectionRetryStrategy() /// /// The default SqlConnection retry strategy (or the default strategy if no default could be found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryStrategy GetDefaultSqlCommandRetryStrategy() - { + public virtual RetryStrategy GetDefaultSqlCommandRetryStrategy() { return GetRetryStrategy(this.DefaultSqlCommandStrategyName); } @@ -133,8 +125,7 @@ public virtual RetryStrategy GetDefaultSqlCommandRetryStrategy() /// /// The default Windows Azure Service retry strategy (or the default strategy if no default could be found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryStrategy GetDefaultAzureServiceBusRetryStrategy() - { + public virtual RetryStrategy GetDefaultAzureServiceBusRetryStrategy() { return GetRetryStrategy(this.DefaultAzureServiceBusStrategyName); } @@ -143,8 +134,7 @@ public virtual RetryStrategy GetDefaultAzureServiceBusRetryStrategy() /// /// The default Windows Azure Caching retry strategy (or the default strategy if no default could be found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryStrategy GetDefaultAzureCachingRetryStrategy() - { + public virtual RetryStrategy GetDefaultAzureCachingRetryStrategy() { return GetRetryStrategy(this.DefaultAzureCachingStrategyName); } @@ -153,8 +143,7 @@ public virtual RetryStrategy GetDefaultAzureCachingRetryStrategy() /// /// The default Windows Azure Storage retry strategy (or the default strategy if no default could be found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryStrategy GetDefaultAzureStorageRetryStrategy() - { + public virtual RetryStrategy GetDefaultAzureStorageRetryStrategy() { return GetRetryStrategy(this.DefaultAzureStorageStrategyName); } @@ -163,8 +152,7 @@ public virtual RetryStrategy GetDefaultAzureStorageRetryStrategy() /// /// The retry policy for Windows Azure Service Bus with the corresponding default strategy (or the default strategy if no retry strategy definition assigned to Windows Azure Service Bus was found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryPolicy GetDefaultAzureServiceBusRetryPolicy() - { + public virtual RetryPolicy GetDefaultAzureServiceBusRetryPolicy() { return new RetryPolicy(this.GetDefaultAzureServiceBusRetryStrategy()); } @@ -173,8 +161,7 @@ public virtual RetryPolicy GetDefaultAzureServiceBusRetryPolicy() /// /// The retry policy for Windows Azure Storage with the corresponding default strategy (or the default strategy if no retry strategy definition assigned to Windows Azure Storage was found). [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate", Justification = "As designed")] - public virtual RetryPolicy GetDefaultAzureStorageRetryPolicy() - { + public virtual RetryPolicy GetDefaultAzureStorageRetryPolicy() { return new RetryPolicy(this.GetDefaultAzureStorageRetryStrategy()); } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManagerImpl.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManagerImpl.cs index 2c3fb1c..e4b023a 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManagerImpl.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryManagerImpl.cs @@ -9,22 +9,20 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling { + using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Properties; + using Microsoft.Practices.TransientFaultHandling; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; - using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.Properties; - using Microsoft.Practices.TransientFaultHandling; /// /// Non-static entry point to the retry functionality. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Justification = "As designed. Naming convention.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Impl", Justification = "As designed. Naming convention.")] - public class RetryManagerImpl : RetryManager - { + public class RetryManagerImpl : RetryManager { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes", Justification = "Used as read only")] private readonly IDictionary retryStrategies; @@ -39,8 +37,7 @@ public class RetryManagerImpl : RetryManager /// The default retry strategy for Windows Azure Caching. /// The default retry strategy for Windows Azure Storage. public RetryManagerImpl(IEnumerable retryStrategies, string defaultRetryStrategyName, string defaultSqlConnectionStrategyName, string defaultSqlCommandStrategyName, string defaultAzureServiceBusStrategyName, string defaultAzureCachingStrategyName, string defaultAzureStorageStrategyName) - : this(retryStrategies.ToDictionary(p => p.Name), defaultRetryStrategyName, defaultSqlConnectionStrategyName, defaultSqlCommandStrategyName, defaultAzureServiceBusStrategyName, defaultAzureCachingStrategyName, defaultAzureStorageStrategyName) - { + : this(retryStrategies.ToDictionary(p => p.Name), defaultRetryStrategyName, defaultSqlConnectionStrategyName, defaultSqlCommandStrategyName, defaultAzureServiceBusStrategyName, defaultAzureCachingStrategyName, defaultAzureStorageStrategyName) { } /// @@ -54,8 +51,7 @@ public RetryManagerImpl(IEnumerable retryStrategies, string defau /// The default retry strategy for Windows Azure Caching. /// The default retry strategy for Windows Azure Storage. public RetryManagerImpl(IDictionary retryStrategies, string defaultRetryStrategyName, string defaultSqlConnectionStrategyName, string defaultSqlCommandStrategyName, string defaultAzureServiceBusStrategyName, string defaultAzureCachingStrategyName, string defaultAzureStorageStrategyName) - : base(defaultRetryStrategyName, defaultSqlConnectionStrategyName, defaultSqlCommandStrategyName, defaultAzureServiceBusStrategyName, defaultAzureCachingStrategyName, defaultAzureStorageStrategyName) - { + : base(defaultRetryStrategyName, defaultSqlConnectionStrategyName, defaultSqlCommandStrategyName, defaultAzureServiceBusStrategyName, defaultAzureCachingStrategyName, defaultAzureStorageStrategyName) { this.retryStrategies = retryStrategies; } @@ -64,14 +60,12 @@ public RetryManagerImpl(IDictionary retryStrategies, stri /// /// The retry Strategy Name. /// The retry matching the specified name. - public override RetryStrategy GetRetryStrategy(string retryStrategyName) - { + public override RetryStrategy GetRetryStrategy(string retryStrategyName) { Guard.ArgumentNotNullOrEmptyString(retryStrategyName, "retryStrategyName"); RetryStrategy retryStrategy; - if (!this.retryStrategies.TryGetValue(retryStrategyName, out retryStrategy)) - { + if (!this.retryStrategies.TryGetValue(retryStrategyName, out retryStrategy)) { throw new ArgumentOutOfRangeException(string.Format(CultureInfo.CurrentCulture, Resources.RetryStrategyNotFound, retryStrategyName)); } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryPolicyException.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryPolicyException.cs index e832496..ba740e9 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryPolicyException.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/RetryPolicyException.cs @@ -9,8 +9,7 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling { using System; using System.Runtime.Serialization; @@ -18,13 +17,11 @@ namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandl /// Represents an error that occurs while using the Transient Fault Handling Application Block. /// [Serializable] - public class RetryPolicyException : Exception - { + public class RetryPolicyException : Exception { /// /// Initializes a new instance of the class. /// - public RetryPolicyException() - { + public RetryPolicyException() { } /// @@ -32,8 +29,7 @@ public RetryPolicyException() /// /// The message that describes the error. public RetryPolicyException(string message) - : base(message) - { + : base(message) { } /// @@ -42,8 +38,7 @@ public RetryPolicyException(string message) /// /// The message that describes the error. /// The inner exception reference. - public RetryPolicyException(string message, Exception inner) : base(message, inner) - { + public RetryPolicyException(string message, Exception inner) : base(message, inner) { } /// @@ -53,8 +48,7 @@ public RetryPolicyException(string message, Exception inner) : base(message, inn /// The that contains contextual information about the source or destination. protected RetryPolicyException( SerializationInfo info, - StreamingContext context) : base(info, context) - { + StreamingContext context) : base(info, context) { } } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs index 42944f9..b50fce9 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs @@ -9,8 +9,10 @@ // FITNESS FOR A PARTICULAR PURPOSE. //=============================================================================== -namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus -{ +namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus { + using Microsoft.Practices.TransientFaultHandling; + using Microsoft.ServiceBus; + using Microsoft.ServiceBus.Messaging; using System; using System.IdentityModel.Tokens; using System.Net; @@ -18,15 +20,11 @@ namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandl using System.Security; using System.ServiceModel; using System.Text.RegularExpressions; - using Microsoft.Practices.TransientFaultHandling; - using Microsoft.ServiceBus; - using Microsoft.ServiceBus.Messaging; /// /// Provides the transient error detection logic that can recognize transient faults when dealing with Windows Azure Service Bus. /// - public class ServiceBusTransientErrorDetectionStrategy : ITransientErrorDetectionStrategy - { + public class ServiceBusTransientErrorDetectionStrategy : ITransientErrorDetectionStrategy { /// /// Provides a compiled regular expression used for extracting the error code from the message. /// @@ -37,8 +35,7 @@ public class ServiceBusTransientErrorDetectionStrategy : ITransientErrorDetectio /// /// The exception object to be verified. /// True if the specified exception is considered as transient, otherwise false. - public bool IsTransient(Exception ex) - { + public bool IsTransient(Exception ex) { return ex != null && (CheckIsTransientInternal(ex) || (ex.InnerException != null && CheckIsTransientInternal(ex.InnerException))); } @@ -48,85 +45,67 @@ public bool IsTransient(Exception ex) /// The error to check. /// protected virtual bool CheckIsTransientInternal(Exception ex) { - return CheckIsTransient(ex); + return CheckIsTransient(ex); } // SecuritySafeCritical because it references MessageLockLostException, MessagingCommunicationException, // MessagingEntityAlreadyExistsException, MessagingEntityNotFoundException, ServerBusyException, ServerErrorException [SecuritySafeCritical] - private static bool CheckIsTransient(Exception ex) - { - if (ex is FaultException) - { + private static bool CheckIsTransient(Exception ex) { + if (ex is FaultException) { return false; } - else if (ex is MessagingEntityNotFoundException) - { + else if (ex is MessagingEntityNotFoundException) { return false; } - else if (ex is MessagingEntityAlreadyExistsException) - { + else if (ex is MessagingEntityAlreadyExistsException) { return false; } - else if (ex is MessageLockLostException) - { + else if (ex is MessageLockLostException) { return false; } - else if (ex is CommunicationObjectFaultedException) - { + else if (ex is CommunicationObjectFaultedException) { return false; } - else if (ex is MessagingCommunicationException) - { + else if (ex is MessagingCommunicationException) { return true; } - else if (ex is TimeoutException) - { + else if (ex is TimeoutException) { return true; } - else if (ex is WebException) - { + else if (ex is WebException) { return true; } - else if (ex is SecurityTokenException) - { + else if (ex is SecurityTokenException) { return true; } - else if (ex is ServerTooBusyException) - { + else if (ex is ServerTooBusyException) { return true; } - else if (ex is ServerBusyException) - { + else if (ex is ServerBusyException) { return true; } - else if (ex is ServerErrorException) - { + else if (ex is ServerErrorException) { return true; } - else if (ex is ProtocolException) - { + else if (ex is ProtocolException) { return true; } - else if (ex is EndpointNotFoundException) - { + else if (ex is EndpointNotFoundException) { // This exception may occur when a listener and a consumer are being // initialized out of sync (e.g. consumer is reaching to a listener that // is still in the process of setting up the Service Host). return true; } - else if (ex is CommunicationException) - { + else if (ex is CommunicationException) { return true; } - else if (ex is SocketException) - { + else if (ex is SocketException) { var socketFault = ex as SocketException; return socketFault.SocketErrorCode == SocketError.TimedOut; } - else if (ex is UnauthorizedAccessException) - { + else if (ex is UnauthorizedAccessException) { // Need to provide some resilience against the following fault that was seen a few times: // System.UnauthorizedAccessException: The token provider was unable to provide a security token while accessing 'https://mysbns-sb.accesscontrol.windows.net/WRAPv0.9/'. // Token provider returned message: 'Error:Code:500:SubCode:T9002:Detail:An internal network error occured. Please try again.'. @@ -136,8 +115,7 @@ private static bool CheckIsTransient(Exception ex) var match = acsErrorCodeRegEx.Match(ex.Message); var errorCode = 0; - if (match.Success && match.Groups.Count > 1 && int.TryParse(match.Groups[1].Value, out errorCode)) - { + if (match.Success && match.Groups.Count > 1 && int.TryParse(match.Groups[1].Value, out errorCode)) { return errorCode == (int)HttpStatusCode.InternalServerError; } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorToDetermineExistanceDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorToDetermineExistanceDetectionStrategy.cs index 25989ab..6a9bb57 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorToDetermineExistanceDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorToDetermineExistanceDetectionStrategy.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus; -using System.Net; +using Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.ServiceBus; using Microsoft.ServiceBus.Messaging; +using System; +using System.Net; namespace ProjectExtensions.Azure.ServiceBus.TransientFaultHandling.ServiceBus { - + /// /// When we verify if an item exits, we consider a 404 to NOT be Transient. /// @@ -23,7 +20,7 @@ protected override bool CheckIsTransientInternal(Exception ex) { return false; } } - + return base.CheckIsTransientInternal(ex); } diff --git a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs index aeea1c3..214d08e 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System; namespace ProjectExtensions.Azure.ServiceBus.Wrappers { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs index 6e5b04d..32bcf25 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System; namespace ProjectExtensions.Azure.ServiceBus.Wrappers { - + class TopicClientWrapper : ITopicClient { TopicClient topicClient; diff --git a/src/Samples/PubSubUsingCastleWindsor/Bootstrapper.cs b/src/Samples/PubSubUsingCastleWindsor/Bootstrapper.cs index 81a71ed..4fbf0b9 100644 --- a/src/Samples/PubSubUsingCastleWindsor/Bootstrapper.cs +++ b/src/Samples/PubSubUsingCastleWindsor/Bootstrapper.cs @@ -1,6 +1,5 @@ using ProjectExtensions.Azure.ServiceBus; using ProjectExtensions.Azure.ServiceBus.CastleWindsor.Container; -using PubSubUsingConfiguration; namespace PubSubUsingConfiguration { public static class Bootstrapper { diff --git a/src/Samples/PubSubUsingCastleWindsor/Properties/AssemblyInfo.cs b/src/Samples/PubSubUsingCastleWindsor/Properties/AssemblyInfo.cs index 948a5fc..b958800 100644 --- a/src/Samples/PubSubUsingCastleWindsor/Properties/AssemblyInfo.cs +++ b/src/Samples/PubSubUsingCastleWindsor/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/Samples/PubSubUsingConfiguration/AnotherTestMessage.cs b/src/Samples/PubSubUsingConfiguration/AnotherTestMessage.cs index c3b9c3a..94243e7 100644 --- a/src/Samples/PubSubUsingConfiguration/AnotherTestMessage.cs +++ b/src/Samples/PubSubUsingConfiguration/AnotherTestMessage.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace PubSubUsingConfiguration { +namespace PubSubUsingConfiguration { public class AnotherTestMessage { diff --git a/src/Samples/PubSubUsingConfiguration/AnotherTestMessageSubscriber.cs b/src/Samples/PubSubUsingConfiguration/AnotherTestMessageSubscriber.cs index 6d6b2ae..0f99cc2 100644 --- a/src/Samples/PubSubUsingConfiguration/AnotherTestMessageSubscriber.cs +++ b/src/Samples/PubSubUsingConfiguration/AnotherTestMessageSubscriber.cs @@ -1,23 +1,196 @@ -using System; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using System; using System.Collections.Generic; using System.Linq; using System.Text; +After: +using Microsoft.ServiceBus.Messaging; +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +After: +using Microsoft.ServiceBus.Messaging; +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +After: +using Microsoft.ServiceBus.Messaging; +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +After: +using Microsoft.ServiceBus.Messaging; +using NLog; using ProjectExtensions.Azure.ServiceBus; +using System; +*/ +using Microsoft.ServiceBus.Messaging; using NLog; +using ProjectExtensions.Azure.ServiceBus; +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using System.Collections.Generic; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +After: +/* Unmerged change from project 'PubSubUsingCastleWindsor' +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: +using System.Collections.Generic; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +After: +/* Unmerged change from project 'PubSubUsingCastleWindsor' +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using System.Collections.Generic; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +After: +/* Unmerged change from project 'PubSubUsingCastleWindsor' +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using System.Collections.Generic; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +After: +/* Unmerged change from project 'PubSubUsingCastleWindsor' +*/ + + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using NLog; +After: +using System.Diagnostics; +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: +using NLog; +After: +using System.Diagnostics; +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using NLog; +After: +using System.Diagnostics; +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using NLog; +After: using System.Diagnostics; +*/ +using System +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using System.Linq; +After: +using System.Collections.Generic; +using System.Linq; +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: +using System.Linq; +After: +using System.Collections.Generic; +using System.Linq; +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using System.Linq; +After: +using System.Collections.Generic; +using System.Linq; +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using System.Linq; +After: +using System.Collections.Generic; +using System.Linq; +*/ +; +using System.Diagnostics; +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using Microsoft.ServiceBus.Messaging; +After: +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: using Microsoft.ServiceBus.Messaging; +After: +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using Microsoft.ServiceBus.Messaging; +After: +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using Microsoft.ServiceBus.Messaging; +After: +using System.Text; +*/ + namespace PubSubUsingConfiguration { [MessageHandlerConfiguration( - DefaultMessageTimeToLive = 240, - LockDuration = 120, + DefaultMessageTimeToLive = 240, + LockDuration = 120, MaxConcurrentCalls = 4, - MaxRetries = 2, - PrefetchCount = 20, + MaxRetries = 2, + PrefetchCount = 20, PauseTimeIfErrorWasThrown = 20000, - ReceiveMode = ReceiveMode.PeekLock, - Singleton=true)] + ReceiveMode = ReceiveMode.PeekLock, + Singleton = true)] public class AnotherTestMessageSubscriber : IHandleCompetingMessages { static Logger logger = LogManager.GetCurrentClassLogger(); diff --git a/src/Samples/PubSubUsingConfiguration/Bootstrapper.cs b/src/Samples/PubSubUsingConfiguration/Bootstrapper.cs index 816992e..ed876b5 100644 --- a/src/Samples/PubSubUsingConfiguration/Bootstrapper.cs +++ b/src/Samples/PubSubUsingConfiguration/Bootstrapper.cs @@ -1,7 +1,7 @@ -using System.Configuration; using Amazon.ServiceBus.DistributedMessages.Serializers; using ProjectExtensions.Azure.ServiceBus; using ProjectExtensions.Azure.ServiceBus.Autofac.Container; +using System.Configuration; namespace PubSubUsingConfiguration { static internal class Bootstrapper { diff --git a/src/Samples/PubSubUsingConfiguration/GZipXmlSerializer.cs b/src/Samples/PubSubUsingConfiguration/GZipXmlSerializer.cs index d6c1dc6..e5de829 100644 --- a/src/Samples/PubSubUsingConfiguration/GZipXmlSerializer.cs +++ b/src/Samples/PubSubUsingConfiguration/GZipXmlSerializer.cs @@ -1,13 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using NLog; using ProjectExtensions.Azure.ServiceBus.Serialization; -using NLog; +using System; using System.IO; -using System.Xml.Serialization; using System.IO.Compression; using System.Xml; +using System.Xml.Serialization; namespace Amazon.ServiceBus.DistributedMessages.Serializers { diff --git a/src/Samples/PubSubUsingConfiguration/Program.cs b/src/Samples/PubSubUsingConfiguration/Program.cs index a4ced70..3a7405d 100644 --- a/src/Samples/PubSubUsingConfiguration/Program.cs +++ b/src/Samples/PubSubUsingConfiguration/Program.cs @@ -1,9 +1,9 @@ -using System; -using System.Collections.Generic; -using ProjectExtensions.Azure.ServiceBus; +using NLog; using NLog.Config; using NLog.Targets; -using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +using System.Collections.Generic; using System.Diagnostics; using System.Transactions; @@ -67,7 +67,7 @@ static void Main(string[] args) { MessageId = DateTime.Now.ToString() }; BusConfiguration.Instance.Bus.PublishAsync(message2, (result) => { - if (!result.IsSuccess) { + if (!result.IsSuccess) { //message failed. } Debug.WriteLine("async:" + result.TimeSpent); diff --git a/src/Samples/PubSubUsingConfiguration/Properties/AssemblyInfo.cs b/src/Samples/PubSubUsingConfiguration/Properties/AssemblyInfo.cs index ffc2f7c..064e775 100644 --- a/src/Samples/PubSubUsingConfiguration/Properties/AssemblyInfo.cs +++ b/src/Samples/PubSubUsingConfiguration/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/Samples/PubSubUsingConfiguration/TestMessage.cs b/src/Samples/PubSubUsingConfiguration/TestMessage.cs index 07e8968..3592312 100644 --- a/src/Samples/PubSubUsingConfiguration/TestMessage.cs +++ b/src/Samples/PubSubUsingConfiguration/TestMessage.cs @@ -1,12 +1,55 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +namespace PubSubUsingConfiguration { -namespace PubSubUsingConfiguration { + /* Unmerged change from project 'PubSubUsingCastleWindsor' + Before: + public class TestMessage { + + public string MessageId { + After: + public class TestMessage + { + + public string MessageId { + */ + + /* Unmerged change from project 'PubSubUsingStructureMap' + Before: + public class TestMessage { + + public string MessageId { + After: + public class TestMessage + { + + public string MessageId { + */ + + /* Unmerged change from project 'PubSubUsingUnity' + Before: + public class TestMessage { + + public string MessageId { + After: + public class TestMessage + { + + public string MessageId { + */ + + /* Unmerged change from project 'PubSubUsingNinject' + Before: + public class TestMessage { + + public string MessageId { + After: + public class TestMessage + { + + public string MessageId { + */ public class TestMessage { - + public string MessageId { get; set; diff --git a/src/Samples/PubSubUsingConfiguration/TestMessageSubscriber.cs b/src/Samples/PubSubUsingConfiguration/TestMessageSubscriber.cs index 2fe5a14..65aa295 100644 --- a/src/Samples/PubSubUsingConfiguration/TestMessageSubscriber.cs +++ b/src/Samples/PubSubUsingConfiguration/TestMessageSubscriber.cs @@ -1,14 +1,78 @@ -using System; + +/* Unmerged change from project 'PubSubUsingCastleWindsor' +Before: +using System; using System.Collections.Generic; using System.Linq; using System.Text; using ProjectExtensions.Azure.ServiceBus; using NLog; +After: +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +using System.Collections.Generic; +using System.Azure.ServiceBus; +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingStructureMap' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ProjectExtensions.Azure.ServiceBus; +using NLog; +After: +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +using System.Collections.Generic; +using System.Azure.ServiceBus; +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingUnity' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ProjectExtensions.Azure.ServiceBus; +using NLog; +After: +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +using System.Collections.Generic; +using System.Azure.ServiceBus; +using System.Text; +*/ + +/* Unmerged change from project 'PubSubUsingNinject' +Before: +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using ProjectExtensions.Azure.ServiceBus; +using NLog; +After: +using NLog; +using ProjectExtensions.Azure.ServiceBus; +using System; +using System.Collections.Generic; +using System.Azure.ServiceBus; +using System.Text; +*/ +using NLog; +using ProjectExtensions.Azure.ServiceBus; namespace PubSubUsingConfiguration { [MessageHandlerConfiguration( - DeadLetterAfterMaxRetries=true, + DeadLetterAfterMaxRetries = true, MaxRetries = 2, PauseTimeIfErrorWasThrown = 15000, Singleton = true)] diff --git a/src/Samples/PubSubUsingNinject/Properties/AssemblyInfo.cs b/src/Samples/PubSubUsingNinject/Properties/AssemblyInfo.cs index fdb9c6f..1a8b47a 100644 --- a/src/Samples/PubSubUsingNinject/Properties/AssemblyInfo.cs +++ b/src/Samples/PubSubUsingNinject/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/Samples/PubSubUsingStructureMap/Bootstrapper.cs b/src/Samples/PubSubUsingStructureMap/Bootstrapper.cs index 6b6f74d..3673c3a 100644 --- a/src/Samples/PubSubUsingStructureMap/Bootstrapper.cs +++ b/src/Samples/PubSubUsingStructureMap/Bootstrapper.cs @@ -1,6 +1,5 @@ using ProjectExtensions.Azure.ServiceBus; using ProjectExtensions.Azure.ServiceBus.StructureMap.Container; -using PubSubUsingConfiguration; namespace PubSubUsingConfiguration { public static class Bootstrapper { diff --git a/src/Samples/PubSubUsingStructureMap/Properties/AssemblyInfo.cs b/src/Samples/PubSubUsingStructureMap/Properties/AssemblyInfo.cs index 791fca1..1ca9ff9 100644 --- a/src/Samples/PubSubUsingStructureMap/Properties/AssemblyInfo.cs +++ b/src/Samples/PubSubUsingStructureMap/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/Samples/PubSubUsingUnity/Bootstrapper.cs b/src/Samples/PubSubUsingUnity/Bootstrapper.cs index aab0e3d..a448648 100644 --- a/src/Samples/PubSubUsingUnity/Bootstrapper.cs +++ b/src/Samples/PubSubUsingUnity/Bootstrapper.cs @@ -1,6 +1,5 @@ using ProjectExtensions.Azure.ServiceBus; using ProjectExtensions.Azure.ServiceBus.Unity.Container; -using PubSubUsingConfiguration; namespace PubSubUsingConfiguration { public static class Bootstrapper { diff --git a/src/Samples/PubSubUsingUnity/Properties/AssemblyInfo.cs b/src/Samples/PubSubUsingUnity/Properties/AssemblyInfo.cs index 6768f01..a2ecc53 100644 --- a/src/Samples/PubSubUsingUnity/Properties/AssemblyInfo.cs +++ b/src/Samples/PubSubUsingUnity/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/Properties/AssemblyInfo.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/Properties/AssemblyInfo.cs index 865bc84..6dd3e4a 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/Properties/AssemblyInfo.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Config.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Config.cs index b4eec2a..298dd19 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Config.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Config.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Autofac; using NUnit.Framework; using ProjectExtensions.Azure.ServiceBus.Autofac.Container; -using Autofac; using ProjectExtensions.Azure.ServiceBus.Interfaces; -using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Messages; -using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; +using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks; +using System; using System.Diagnostics; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit { @@ -20,7 +16,7 @@ public class Config { public void SetUp() { var builder = new ContainerBuilder(); - + builder.RegisterType(typeof(MockSubscriptionClient)).As(typeof(ISubscriptionClient)).SingleInstance(); builder.RegisterType(typeof(MockTopicClient)).As(typeof(ITopicClient)).SingleInstance(); builder.RegisterType(typeof(MockNamespaceManager)).As(typeof(INamespaceManager)).SingleInstance(); @@ -40,7 +36,7 @@ public void SetUp() { BusConfiguration.Instance.Bus.PublishAsync(new TestMessageForTesting(), (callback) => { Debug.WriteLine("Time Spent:" + callback.TimeSpent); Console.WriteLine("Time Spent:" + callback.TimeSpent); - }); + }); } } diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Handlers/TestMessageForTestingHandler.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Handlers/TestMessageForTestingHandler.cs index 047826f..44783f9 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Handlers/TestMessageForTestingHandler.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Handlers/TestMessageForTestingHandler.cs @@ -1,17 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Messages; +using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Messages; +using System; using System.Diagnostics; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Handlers { - + public class TestMessageForTestingHandler : IHandleMessages { - - public void Handle(IReceivedMessage message) { - Debug.WriteLine("Received:" + message.BrokeredMessage.MessageId + " Value:" + message.Message.Id + " counter:" + message.Message.Counter); - Console.WriteLine("Received:" + message.BrokeredMessage.MessageId + " Value:" + message.Message.Id + " counter:" + message.Message.Counter); - } - } + + public void Handle(IReceivedMessage message) { + Debug.WriteLine("Received:" + message.BrokeredMessage.MessageId + " Value:" + message.Message.Id + " counter:" + message.Message.Counter); + Console.WriteLine("Received:" + message.BrokeredMessage.MessageId + " Value:" + message.Message.Id + " counter:" + message.Message.Counter); + } + } } diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Interfaces/IMockServiceBus.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Interfaces/IMockServiceBus.cs index aee950c..11ee403 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Interfaces/IMockServiceBus.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Interfaces/IMockServiceBus.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.ServiceBus.Messaging; +using Microsoft.ServiceBus.Messaging; using ProjectExtensions.Azure.ServiceBus.Interfaces; +using System; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Messages/TestMessageForTesting.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Messages/TestMessageForTesting.cs index 89d7536..59c6810 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Messages/TestMessageForTesting.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Messages/TestMessageForTesting.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Messages { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockBrokeredMessage.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockBrokeredMessage.cs index 6bf7492..2710b24 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockBrokeredMessage.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockBrokeredMessage.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.TransientFaultHandling; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; -using Microsoft.Practices.TransientFaultHandling; +using System; +using System.Collections.Generic; using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockIAsyncResult.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockIAsyncResult.cs index ec1de31..c5df0a9 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockIAsyncResult.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockIAsyncResult.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockMessagingFactory.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockMessagingFactory.cs index 41f57eb..8fb5adb 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockMessagingFactory.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockMessagingFactory.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; -using System.IO; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; -using Microsoft.Practices.TransientFaultHandling; +using System.IO; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockNamespaceManager.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockNamespaceManager.cs index 8b053e8..1a43ba4 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockNamespaceManager.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockNamespaceManager.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; +using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; -using Microsoft.Practices.TransientFaultHandling; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockServiceBus.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockServiceBus.cs index 22b277e..6d4d1a0 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockServiceBus.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockServiceBus.cs @@ -1,15 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; +using Microsoft.Practices.TransientFaultHandling; using Microsoft.ServiceBus.Messaging; +using ProjectExtensions.Azure.ServiceBus.Helpers; using ProjectExtensions.Azure.ServiceBus.Interfaces; -using Microsoft.Practices.TransientFaultHandling; +using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.Threading; using System.Threading.Tasks; -using ProjectExtensions.Azure.ServiceBus.Helpers; -using System.Diagnostics; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockSubscriptionClient.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockSubscriptionClient.cs index 87c2aa6..56c07ab 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockSubscriptionClient.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockSubscriptionClient.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.TransientFaultHandling; +using Microsoft.ServiceBus.Messaging; using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; -using Microsoft.ServiceBus.Messaging; -using Microsoft.Practices.TransientFaultHandling; +using System; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs index 1a7d853..6b0296b 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs @@ -1,10 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using Microsoft.Practices.TransientFaultHandling; using ProjectExtensions.Azure.ServiceBus.Interfaces; using ProjectExtensions.Azure.ServiceBus.Tests.Unit.Interfaces; -using Microsoft.Practices.TransientFaultHandling; +using System; +using System.Collections.Generic; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit.Mocks { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Properties/AssemblyInfo.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Properties/AssemblyInfo.cs index 2e18ca6..54e14f7 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Properties/AssemblyInfo.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/SampleTest.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/SampleTest.cs index 09b11a1..f7fcc14 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/SampleTest.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/SampleTest.cs @@ -1,12 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework; -using System.Threading; +using NUnit.Framework; namespace ProjectExtensions.Azure.ServiceBus.Tests.Unit { - + [TestFixture] public class SampleTest { From c88699764f221145a3599b38689301c1f0ec8856 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:00:06 -0500 Subject: [PATCH 03/26] feat(): upgrade to .net4.8 --- ProjectExtensions.Azure.ServiceBus.sln | 4 +++- ...tExtensions.Azure.ServiceBus.Autofac.csproj | 7 +++++-- ...sions.Azure.ServiceBus.CastleWindsor.csproj | 7 +++++-- ...tExtensions.Azure.ServiceBus.Ninject.csproj | 7 +++++-- ...nsions.Azure.ServiceBus.StructureMap.csproj | 7 +++++-- ...ectExtensions.Azure.ServiceBus.Unity.csproj | 7 +++++-- .../ProjectExtensions.Azure.ServiceBus.csproj | 7 +++++-- .../app.config | 4 ++-- .../PubSubUsingCastleWindsor.csproj | 6 ++++-- .../PubSubUsingConfiguration.csproj | 6 ++++-- .../PubSubUsingConfiguration/app.config | 18 +++++++++--------- .../PubSubUsingNinject.csproj | 6 ++++-- .../PubSubUsingStructureMap.csproj | 6 ++++-- .../PubSubUsingUnity/PubSubUsingUnity.csproj | 6 ++++-- ...s.Azure.ServiceBus.Tests.Integration.csproj | 7 +++++-- ...tensions.Azure.ServiceBus.Tests.Unit.csproj | 7 +++++-- .../app.config | 4 ++-- 17 files changed, 76 insertions(+), 40 deletions(-) diff --git a/ProjectExtensions.Azure.ServiceBus.sln b/ProjectExtensions.Azure.ServiceBus.sln index bd20d21..1d4f078 100644 --- a/ProjectExtensions.Azure.ServiceBus.sln +++ b/ProjectExtensions.Azure.ServiceBus.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33530.505 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectExtensions.Azure.ServiceBus", "src\ProjectExtensions.Azure.ServiceBus\ProjectExtensions.Azure.ServiceBus.csproj", "{8C8A8531-95AE-41CD-B2AC-6651F104245E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectExtensions.Azure.ServiceBus.Tests.Unit", "src\Tests\ProjectExtensions.Azure.ServiceBus.Tests.Unit\ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj", "{7B5EB3D2-771D-467C-B467-60BF2065890D}" diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj index 590a52c..d508397 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.Autofac ProjectExtensions.Azure.ServiceBus.Autofac - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Autofac.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Autofac.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj index 7ddede8..b8a9d3f 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.CastleWindsor ProjectExtensions.Azure.ServiceBus.CastleWindsor - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.CastleWindsor.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.CastleWindsor.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj index 144a06c..aaed169 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.Ninject ProjectExtensions.Azure.ServiceBus.Ninject - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Ninject.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Ninject.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj index a1b3f4d..fac4b41 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.StructureMap ProjectExtensions.Azure.ServiceBus.StructureMap - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.StructureMap.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.StructureMap.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj index f35ac63..8792df5 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.Unity ProjectExtensions.Azure.ServiceBus.Unity - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Unity.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Unity.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index ddfb11c..5b9391e 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus ProjectExtensions.Azure.ServiceBus - v4.0 + v4.8 512 + true @@ -22,6 +23,7 @@ prompt 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.XML + false pdbonly @@ -31,6 +33,7 @@ prompt 4 bin\Release\ProjectExtensions.Azure.ServiceBus.XML + false diff --git a/src/ProjectExtensions.Azure.ServiceBus/app.config b/src/ProjectExtensions.Azure.ServiceBus/app.config index c5c407b..a8fad14 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/app.config +++ b/src/ProjectExtensions.Azure.ServiceBus/app.config @@ -1,4 +1,4 @@ - + - \ No newline at end of file + diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index e0c00cc..e415db9 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties PubSubUsingCastleWindsor PubSubUsingCastleWindsor - v4.0 + v4.8 512 @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false PubSubUsingConfiguration.Program diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index cdd2b87..f67ae87 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties PubSubUsingConfiguration PubSubUsingConfiguration - v4.0 + v4.8 512 @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false diff --git a/src/Samples/PubSubUsingConfiguration/app.config b/src/Samples/PubSubUsingConfiguration/app.config index aee7f5c..76d2e43 100644 --- a/src/Samples/PubSubUsingConfiguration/app.config +++ b/src/Samples/PubSubUsingConfiguration/app.config @@ -1,22 +1,22 @@ - + - - - - + + + + - + - - + + - \ No newline at end of file + diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index 19aab7f..e9098cc 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties PubSubUsingNinject PubSubUsingNinject - v4.0 + v4.8 512 @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index d13c273..d226edd 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties PubSubUsingStructureMap PubSubUsingStructureMap - v4.0 + v4.8 512 @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false PubSubUsingConfiguration.Program diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index 689b61f..9714f4f 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties PubSubUsingUnity PubSubUsingUnity - v4.0 + v4.8 512 @@ -23,6 +23,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -31,6 +32,7 @@ TRACE prompt 4 + false PubSubUsingConfiguration.Program diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj index 905f759..986ae13 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.Tests.Integration ProjectExtensions.Azure.ServiceBus.Tests.Integration - v4.0 + v4.8 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -29,6 +31,7 @@ TRACE prompt 4 + false diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index 02c9182..0f07491 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,8 +10,9 @@ Properties ProjectExtensions.Azure.ServiceBus.Tests.Unit ProjectExtensions.Azure.ServiceBus.Tests.Unit - v4.0 + v4.8 512 + true @@ -21,6 +22,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -29,6 +31,7 @@ TRACE prompt 4 + false diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/app.config b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/app.config index c5c407b..a8fad14 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/app.config +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/app.config @@ -1,4 +1,4 @@ - + - \ No newline at end of file + From 23cb5aeabbb4e984f7a37f3e1f39d64420da4345 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:20:24 -0500 Subject: [PATCH 04/26] feat(): upgrade Autofac --- .../Container/AutofacAzureBusContainer.cs | 14 ++++++++------ ...ojectExtensions.Azure.ServiceBus.Autofac.csproj | 2 +- .../PubSubUsingConfiguration.csproj | 2 +- ...ctExtensions.Azure.ServiceBus.Tests.Unit.csproj | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs index 3ae98c5..182f78a 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/Container/AutofacAzureBusContainer.cs @@ -69,12 +69,14 @@ public override void RegisterConfiguration() { /// Build the container if needed. /// public override void Build() { - if (container == null) { - container = builder.Build(); - } - else { - builder.Update(container); - } + //NOTE: Determine if we need to rebuild the container. This is a workaround for a bug in Autofac. + container = builder.Build(); + //if (container == null) { + // container = builder.Build(); + //} + //else { + // builder.Update(container); + //} builder = new ContainerBuilder(); registeredTypes.Clear(); } diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj index d508397..42e24a8 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj @@ -60,7 +60,7 @@ - 3.3.0 + 7.0.1 diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index f67ae87..4b0c82e 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -77,7 +77,7 @@ - 3.3.0 + 7.0.1 2.0.3 diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index 0f07491..39ac2e8 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -67,7 +67,7 @@ - 3.3.0 + 7.0.1 2.0.3 From b7eaac57ba08183dbb040eba686b2061d787c825 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:21:31 -0500 Subject: [PATCH 05/26] feat(): upgrade Castle --- .../ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj | 4 ++-- .../PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj index b8a9d3f..837f4fe 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj @@ -60,10 +60,10 @@ - 3.2.2 + 5.1.1 - 3.2.1 + 5.1.2 diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index e415db9..b3abf65 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -88,10 +88,10 @@ - 3.2.2 + 5.1.1 - 3.2.1 + 5.1.2 2.0.3 From 5482464e0a1aed8d2b82f794b6b3d663ebfc4dd9 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:22:10 -0500 Subject: [PATCH 06/26] feat(): upgrade Moq --- .../ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj | 2 +- .../ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj index 986ae13..b519daa 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj @@ -50,7 +50,7 @@ - 4.2.1312.1622 + 4.18.4 2.6.3 diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index 39ac2e8..198da89 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -73,7 +73,7 @@ 2.0.3 - 4.2.1312.1622 + 4.18.4 2.6.3 From 28f5bc185c0ba424021d5db80069ce27e74b9cb5 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:22:42 -0500 Subject: [PATCH 07/26] feat(): upgrade Microsoft.WindowsAzure.ConfigurationManager --- .../ProjectExtensions.Azure.ServiceBus.csproj | 2 +- .../PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj | 2 +- .../PubSubUsingConfiguration/PubSubUsingConfiguration.csproj | 2 +- src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj | 2 +- .../PubSubUsingStructureMap/PubSubUsingStructureMap.csproj | 2 +- src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj | 2 +- .../ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index 5b9391e..42a1010 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -153,7 +153,7 @@ - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index b3abf65..681b046 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -94,7 +94,7 @@ 5.1.2 - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index 4b0c82e..3fa0316 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -80,7 +80,7 @@ 7.0.1 - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index e9098cc..9e88f4e 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -85,7 +85,7 @@ - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index d226edd..17b5e30 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -88,7 +88,7 @@ - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index 9714f4f..0ce8908 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -88,7 +88,7 @@ - 2.0.3 + 3.2.3 5.0.8 diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index 198da89..f5cd9c2 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -70,7 +70,7 @@ 7.0.1 - 2.0.3 + 3.2.3 4.18.4 From db81a81a5b1583903135cb67144fea755b1e3987 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:23:09 -0500 Subject: [PATCH 08/26] feat(): upgrade Newtonsoft.Json --- .../ProjectExtensions.Azure.ServiceBus.csproj | 2 +- .../PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj | 2 +- .../PubSubUsingConfiguration/PubSubUsingConfiguration.csproj | 2 +- src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj | 2 +- .../PubSubUsingStructureMap/PubSubUsingStructureMap.csproj | 2 +- src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index 42a1010..8995b80 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -156,7 +156,7 @@ 3.2.3 - 5.0.8 + 13.0.3 2.1.0 diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index 681b046..4301936 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -97,7 +97,7 @@ 3.2.3 - 5.0.8 + 13.0.3 2.1.0 diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index 3fa0316..55db09f 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -83,7 +83,7 @@ 3.2.3 - 5.0.8 + 13.0.3 2.1.0 diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index 9e88f4e..929020b 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -88,7 +88,7 @@ 3.2.3 - 5.0.8 + 13.0.3 3.0.1.10 diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index 17b5e30..7c0fac2 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -91,7 +91,7 @@ 3.2.3 - 5.0.8 + 13.0.3 2.1.0 diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index 0ce8908..a7b7459 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -91,7 +91,7 @@ 3.2.3 - 5.0.8 + 13.0.3 2.1.0 From 1320ec9815139bffefc64d4bf0b67b8f1560e78c Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:23:31 -0500 Subject: [PATCH 09/26] feat(): upgrade Ninject --- .../ProjectExtensions.Azure.ServiceBus.Ninject.csproj | 2 +- src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj index aaed169..b873633 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj @@ -63,7 +63,7 @@ - 3.0.1.10 + 3.3.6 diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index 929020b..5c48c3c 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -91,7 +91,7 @@ 13.0.3 - 3.0.1.10 + 3.3.6 2.1.0 From 309350ea26326e347326b20355ac7df68aa6dc37 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:23:52 -0500 Subject: [PATCH 10/26] feat(): upgrade NLog --- .../ProjectExtensions.Azure.ServiceBus.csproj | 2 +- .../PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj | 2 +- .../PubSubUsingConfiguration/PubSubUsingConfiguration.csproj | 2 +- src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj | 2 +- .../PubSubUsingStructureMap/PubSubUsingStructureMap.csproj | 2 +- src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index 8995b80..6fdf006 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -159,7 +159,7 @@ 13.0.3 - 2.1.0 + 5.1.3 2.4.9 diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index 4301936..677dfdf 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -100,7 +100,7 @@ 13.0.3 - 2.1.0 + 5.1.3 2.4.9 diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index 55db09f..d9a3220 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -86,7 +86,7 @@ 13.0.3 - 2.1.0 + 5.1.3 2.4.9 diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index 5c48c3c..7f8e62b 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -94,7 +94,7 @@ 3.3.6 - 2.1.0 + 5.1.3 2.4.9 diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index 7c0fac2..195313b 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -94,7 +94,7 @@ 13.0.3 - 2.1.0 + 5.1.3 2.6.4.1 diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index a7b7459..a554be1 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -94,7 +94,7 @@ 13.0.3 - 2.1.0 + 5.1.3 2.1.505.2 From 1417c5ad285d6a36a802c719b03335640bda88e1 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:24:13 -0500 Subject: [PATCH 11/26] feat(): upgrade NUnit --- .../ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj | 2 +- .../ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj index b519daa..7b2ebfb 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj @@ -53,7 +53,7 @@ 4.18.4 - 2.6.3 + 3.13.3 3.6.1 diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index f5cd9c2..db1519e 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -76,7 +76,7 @@ 4.18.4 - 2.6.3 + 3.13.3 3.6.1 From 5d44ace7a00f05fec6882f4083f4560a55347062 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:24:34 -0500 Subject: [PATCH 12/26] feat(): upgrade structuremap --- .../ProjectExtensions.Azure.ServiceBus.StructureMap.csproj | 2 +- .../PubSubUsingStructureMap/PubSubUsingStructureMap.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj index fac4b41..e4158a8 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj @@ -63,7 +63,7 @@ - 2.6.4.1 + 4.7.1 diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index 195313b..001e92f 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -97,7 +97,7 @@ 5.1.3 - 2.6.4.1 + 4.7.1 2.4.9 From 351d476cb21d148acc31e08f2b1b30a1f4423363 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:25:41 -0500 Subject: [PATCH 13/26] feat(): upgrade Unity --- .../Container/UnityAzureBusContainer.cs | 5 +++-- .../Container/UnityBusConfigurationBuilderExtensions.cs | 2 +- .../ProjectExtensions.Azure.ServiceBus.Unity.csproj | 2 +- src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs index 18e0c01..f5903a2 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityAzureBusContainer.cs @@ -1,6 +1,7 @@ -using Microsoft.Practices.Unity; -using ProjectExtensions.Azure.ServiceBus.Container; +using ProjectExtensions.Azure.ServiceBus.Container; using System; +using Unity; +using Unity.Lifetime; namespace ProjectExtensions.Azure.ServiceBus.Unity.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs index 9d461aa..387dcd3 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/Container/UnityBusConfigurationBuilderExtensions.cs @@ -1,4 +1,4 @@ -using Microsoft.Practices.Unity; +using Unity; namespace ProjectExtensions.Azure.ServiceBus.Unity.Container { /// diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj index 8792df5..c0ccf48 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj @@ -57,7 +57,7 @@ - 2.1.505.2 + 5.11.10 diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index a554be1..b096d51 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -97,7 +97,7 @@ 5.1.3 - 2.1.505.2 + 5.11.10 2.4.9 From fca388c4ed44ed7d265427a11159208017b84f04 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Sat, 22 Apr 2023 17:33:35 -0500 Subject: [PATCH 14/26] feat(): upgrade WindowsAzure.ServiceBus --- .../Interfaces/ITopicClient.cs | 3 +-- .../ProjectExtensions.Azure.ServiceBus.csproj | 2 +- .../Sender/AzureBusSender.cs | 9 +++++---- .../Wrappers/SubscriptionClientWrapper.cs | 12 ++---------- .../Wrappers/TopicClientWrapper.cs | 8 ++------ .../PubSubUsingCastleWindsor.csproj | 2 +- .../PubSubUsingConfiguration.csproj | 2 +- .../PubSubUsingNinject/PubSubUsingNinject.csproj | 2 +- .../PubSubUsingStructureMap.csproj | 2 +- .../PubSubUsingUnity/PubSubUsingUnity.csproj | 2 +- .../Mocks/MockTopicClient.cs | 14 ++------------ ...ctExtensions.Azure.ServiceBus.Tests.Unit.csproj | 2 +- 12 files changed, 19 insertions(+), 41 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs index 2b89c42..0e864e8 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Interfaces/ITopicClient.cs @@ -3,8 +3,7 @@ namespace ProjectExtensions.Azure.ServiceBus.Interfaces { interface ITopicClient { - IAsyncResult BeginSend(IBrokeredMessage message, AsyncCallback callback, object state); - void EndSend(IAsyncResult result); + void Send(IBrokeredMessage message); void Close(); } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index 6fdf006..ede7d48 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -162,7 +162,7 @@ 5.1.3 - 2.4.9 + 6.2.2 diff --git a/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs b/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs index e316166..265f605 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Sender/AzureBusSender.cs @@ -118,7 +118,7 @@ public void SendAsync(T methodObj, object methodState, Action(T methodObj, object methodState, Action { try { + //NOTE: Refactor to no longer call the end action failureException = null; //we may retry so we must null out the error. // Complete the asynchronous operation. This may throw an exception that will be handled internally by the retry policy. - logger.Debug("sendAction EndSend Begin Type={0} Serializer={1} MessageId={2}", obj.GetType().FullName, serializer.GetType().FullName, message.MessageId); - defaultClient.EndSend(ar); - logger.Debug("sendAction EndSend End Type={0} Serializer={1} MessageId={2}", obj.GetType().FullName, serializer.GetType().FullName, message.MessageId); + //logger.Debug("sendAction EndSend Begin Type={0} Serializer={1} MessageId={2}", obj.GetType().FullName, serializer.GetType().FullName, message.MessageId); + //defaultClient.EndSend(ar); + //logger.Debug("sendAction EndSend End Type={0} Serializer={1} MessageId={2}", obj.GetType().FullName, serializer.GetType().FullName, message.MessageId); } catch (Exception ex) { failureException = ex; diff --git a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs index 214d08e..4067e80 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/SubscriptionClientWrapper.cs @@ -35,16 +35,8 @@ public int PrefetchCount { } } - public IAsyncResult BeginReceive(TimeSpan serverWaitTime, AsyncCallback callback, object state) { - return client.BeginReceive(serverWaitTime, callback, state); - } - - public IBrokeredMessage EndReceive(IAsyncResult result) { - var msg = client.EndReceive(result); - if (msg != null) { - return new BrokeredMessageWrapper(msg); - } - return null; + public IBrokeredMessage BeginReceive(TimeSpan serverWaitTime) { + return new BrokeredMessageWrapper(client.Receive(serverWaitTime)); } public void OnMessage(Action callback, OnMessageOptions onMessageOptions) { diff --git a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs index 32bcf25..ab4a44b 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/Wrappers/TopicClientWrapper.cs @@ -14,15 +14,11 @@ public TopicClientWrapper(TopicClient topicClient) { this.topicClient = topicClient; } - public IAsyncResult BeginSend(IBrokeredMessage message, AsyncCallback callback, object state) { + public void Send(IBrokeredMessage message) { if (!(message is BrokeredMessageWrapper)) { throw new ArgumentOutOfRangeException("message", "message must be BrokeredMessage for Azure use"); } - return topicClient.BeginSend((message as BrokeredMessageWrapper).GetMessage(), callback, state); - } - - public void EndSend(IAsyncResult result) { - topicClient.EndSend(result); + topicClient.Send((message as BrokeredMessageWrapper).GetMessage()); } public void Close() { diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index 677dfdf..919afdb 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -103,7 +103,7 @@ 5.1.3 - 2.4.9 + 6.2.2 diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index d9a3220..3a0e5ca 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -89,7 +89,7 @@ 5.1.3 - 2.4.9 + 6.2.2 diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index 7f8e62b..b9d1df9 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -97,7 +97,7 @@ 5.1.3 - 2.4.9 + 6.2.2 diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index 001e92f..67516ec 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -100,7 +100,7 @@ 4.7.1 - 2.4.9 + 6.2.2 diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index b096d51..f9415ae 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -100,7 +100,7 @@ 5.11.10 - 2.4.9 + 6.2.2 diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs index 6b0296b..3eebdce 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/Mocks/MockTopicClient.cs @@ -24,21 +24,11 @@ public MockTopicClient(IBus serviceBus, string path) { this.Path = path; } - public IAsyncResult BeginSend(IBrokeredMessage message, AsyncCallback callback, object state) { + public void Send(IBrokeredMessage message) { var retVal = new MockIAsyncResult() { - AsyncState = state + AsyncState = null }; _messages[retVal] = message; - callback(retVal); - return retVal; - } - - public void EndSend(IAsyncResult result) { - IBrokeredMessage message = null; - if (!_messages.TryGetValue(result, out message)) { - throw new ApplicationException("You must call EndSend with a valid IAsyncResult. Duplicate Calls are not allowed."); - } - serviceBus.SendMessage(message); } public void Close() { diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index db1519e..dce9a7a 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -82,7 +82,7 @@ 3.6.1 - 2.4.9 + 6.2.2 From f997073deb55380f02e3845f903628031ec8d47a Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 13:54:03 -0500 Subject: [PATCH 15/26] upgrade ProjectExtensions.Azure.ServiceBus.csproj --- .../CloudEnvironment.cs | 8 +- .../HttpContextHelper.cs | 45 +++++ .../ProjectExtensions.Azure.ServiceBus.csproj | 154 ++---------------- .../StorageTransientErrorDetectionStrategy.cs | 35 ++-- ...rviceBusTransientErrorDetectionStrategy.cs | 6 +- 5 files changed, 87 insertions(+), 161 deletions(-) create mode 100644 src/ProjectExtensions.Azure.ServiceBus/HttpContextHelper.cs diff --git a/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs b/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs index 89723e0..e674cf6 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/CloudEnvironment.cs @@ -1,5 +1,5 @@ using System; -using System.Web; +using ProjectExtensions.Azure.ServiceBus; namespace ProjectExtensions.Azure.ServiceBus { @@ -10,11 +10,11 @@ static class CloudEnvironment { /// /// An object that needs to be explicitly disposed so that HttpContext can return back to its original state. public static IDisposable EnsureSafeHttpContext() { - HttpContext oldHttpContext = HttpContext.Current; - HttpContext.Current = null; + var oldHttpContext = HttpContextHelper.Current; + //HttpContextHelper.Current = null; return new AnonymousDisposable(() => { - HttpContext.Current = oldHttpContext; + //HttpContextHelper.Current = oldHttpContext; }); } } diff --git a/src/ProjectExtensions.Azure.ServiceBus/HttpContextHelper.cs b/src/ProjectExtensions.Azure.ServiceBus/HttpContextHelper.cs new file mode 100644 index 0000000..ac6784a --- /dev/null +++ b/src/ProjectExtensions.Azure.ServiceBus/HttpContextHelper.cs @@ -0,0 +1,45 @@ +using System; +using System.Diagnostics; + +#if NET || NETCOREAPP +using Microsoft.AspNetCore.Http; +#else +using System.Web; +#endif + +namespace ProjectExtensions.Azure.ServiceBus +{ + /// + /// Temporary helper class for retrieving the current . This temporary + /// workaround should be removed in the future and should be retrieved + /// from the current controller, middleware, or page instead. +#if NET || NETCOREAPP + /// + /// If working in another component, the current can be retrieved from an + /// retrieved via dependency injection. +#endif + /// + internal static class HttpContextHelper + { + private const string Message = "Prefer accessing HttpContext via injection"; + + /// + /// Gets the current . Returns null if there is no current . + /// +#if NET || NETCOREAPP +#if NET5_0_OR_GREATER + [Obsolete(Message, error: false, DiagnosticId = "HttpContextCurrent", UrlFormat = "https://docs.microsoft.com/en-us/aspnet/core/fundamentals/http-context")] +#else + [Obsolete(Message, error: false)] +#endif + public static HttpContext Current => HttpContextAccessor.HttpContext; + + private static readonly HttpContextAccessor HttpContextAccessor = new HttpContextAccessor(); +#else +#pragma warning disable UA0005 // Do not use HttpContext.Current + [Obsolete(Message, error: false)] + public static HttpContext Current => HttpContext.Current; +#pragma warning restore UA0005 // Do not use HttpContext.Current +#endif + } +} diff --git a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj index ede7d48..1205032 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus/ProjectExtensions.Azure.ServiceBus.csproj @@ -1,157 +1,36 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {8C8A8531-95AE-41CD-B2AC-6651F104245E} Library - Properties - ProjectExtensions.Azure.ServiceBus - ProjectExtensions.Azure.ServiceBus - v4.8 - 512 - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.XML - false + + + net7.0 + false ..\..\lib\Microsoft.WindowsAzure.StorageClient.dll - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Designer - - - - - - + 3.2.3 @@ -161,16 +40,19 @@ 5.1.3 + 6.2.2 + + + + + + all + + + + - - \ No newline at end of file diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs index 9f3b435..d6b61d3 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/AzureStorage/StorageTransientErrorDetectionStrategy.cs @@ -16,7 +16,6 @@ namespace Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandl using Microsoft.Practices.TransientFaultHandling; using Microsoft.WindowsAzure.StorageClient; using System; - using System.Data.Services.Client; using System.Linq; using System.Net; using System.Text.RegularExpressions; @@ -43,13 +42,13 @@ private static bool CheckIsTransient(Exception ex) { return true; } - var dataServiceException = ex as DataServiceRequestException; + //var dataServiceException = ex as DataServiceRequestException; - if (dataServiceException != null) { - if (IsErrorStringMatch(GetErrorCode(dataServiceException), StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut, TableErrorCodeStrings.TableServerOutOfMemory)) { - return true; - } - } + //if (dataServiceException != null) { + // if (IsErrorStringMatch(GetErrorCode(dataServiceException), StorageErrorCodeStrings.InternalError, StorageErrorCodeStrings.ServerBusy, StorageErrorCodeStrings.OperationTimedOut, TableErrorCodeStrings.TableServerOutOfMemory)) { + // return true; + // } + //} var serverException = ex as StorageServerException; @@ -79,17 +78,17 @@ private static bool CheckIsTransient(Exception ex) { } #region Private members - private static string GetErrorCode(DataServiceRequestException ex) { - if (ex != null && ex.InnerException != null) { - var regEx = new Regex(Resources.GetErrorCodeRegEx, RegexOptions.IgnoreCase); - var match = regEx.Match(ex.InnerException.Message); - - return match.Groups[1].Value; - } - else { - return null; - } - } + //private static string GetErrorCode(DataServiceRequestException ex) { + // if (ex != null && ex.InnerException != null) { + // var regEx = new Regex(Resources.GetErrorCodeRegEx, RegexOptions.IgnoreCase); + // var match = regEx.Match(ex.InnerException.Message); + + // return match.Groups[1].Value; + // } + // else { + // return null; + // } + //} private static bool IsErrorCodeMatch(StorageException ex, params StorageErrorCode[] codes) { return ex != null && codes.Contains(ex.ErrorCode); diff --git a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs index b50fce9..326713e 100644 --- a/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs +++ b/src/ProjectExtensions.Azure.ServiceBus/TransientFaultHandling/ServiceBus/ServiceBusTransientErrorDetectionStrategy.cs @@ -76,9 +76,9 @@ private static bool CheckIsTransient(Exception ex) { else if (ex is WebException) { return true; } - else if (ex is SecurityTokenException) { - return true; - } + //else if (ex is SecurityTokenException) { + // return true; + //} else if (ex is ServerTooBusyException) { return true; } From f3813aeb57f70fef9e0378b231f3507f3bd2e611 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 13:58:42 -0500 Subject: [PATCH 16/26] upgrade ProjectExtensions.Azure.ServiceBus.Tests.Unit --- ...Extensions.Azure.ServiceBus.Autofac.csproj | 61 ++----------- ...ensions.Azure.ServiceBus.Tests.Unit.csproj | 88 +++---------------- 2 files changed, 22 insertions(+), 127 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj index 42e24a8..2f701b4 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Autofac/ProjectExtensions.Azure.ServiceBus.Autofac.csproj @@ -1,74 +1,31 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {11192756-9ABB-4C2B-8FE5-2DBD4DC0DC36} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.Autofac - ProjectExtensions.Azure.ServiceBus.Autofac - v4.8 - 512 - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Autofac.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Autofac.XML - false - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + 7.0.1 + + + + all + - - \ No newline at end of file diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj index dce9a7a..ceae09d 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Unit/ProjectExtensions.Azure.ServiceBus.Tests.Unit.csproj @@ -1,74 +1,19 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {7B5EB3D2-771D-467C-B467-60BF2065890D} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.Tests.Unit - ProjectExtensions.Azure.ServiceBus.Tests.Unit - v4.8 - 512 - + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - 7.0.1 + 3.2.3 @@ -81,26 +26,19 @@ 3.6.1 + 6.2.2 + + + + + all + - - {11192756-9ABB-4C2B-8FE5-2DBD4DC0DC36} - ProjectExtensions.Azure.ServiceBus.Autofac - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + - - \ No newline at end of file From 9d97394ec0a05e0b5a5b5d6d20633b82bdfac3b0 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 14:05:08 -0500 Subject: [PATCH 17/26] upgrade ProjectExtensions.Azure.ServiceBus.CastleWindsor --- ...ions.Azure.ServiceBus.CastleWindsor.csproj | 61 +++---------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj index 837f4fe..a588780 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.CastleWindsor/ProjectExtensions.Azure.ServiceBus.CastleWindsor.csproj @@ -1,62 +1,22 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {69CAB6DE-C753-42F9-9E8F-935B975DBCA2} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.CastleWindsor - ProjectExtensions.Azure.ServiceBus.CastleWindsor - v4.8 - 512 - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.CastleWindsor.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.CastleWindsor.XML - false - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + @@ -65,13 +25,10 @@ 5.1.2 + + + + all + - - \ No newline at end of file From 9aadf8fa1aa5009d936cc2ecc2018c3ea2d97b7e Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 14:06:56 -0500 Subject: [PATCH 18/26] upgrade ProjectExtensions.Azure.ServiceBus.Ninject --- ...Extensions.Azure.ServiceBus.Ninject.csproj | 61 +++---------------- 1 file changed, 9 insertions(+), 52 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj index b873633..d611504 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Ninject/ProjectExtensions.Azure.ServiceBus.Ninject.csproj @@ -1,77 +1,34 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {18285A92-F031-45A5-97BB-FE3841DAB434} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.Ninject - ProjectExtensions.Azure.ServiceBus.Ninject - v4.8 - 512 - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Ninject.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Ninject.XML - false - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + 3.3.6 + + + all + - - \ No newline at end of file From 50bcd9507a41e1d62932477a5476c306ebab370c Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 14:08:32 -0500 Subject: [PATCH 19/26] upgrade ProjectExtensions.Azure.ServiceBus.StructureMap --- ...sions.Azure.ServiceBus.StructureMap.csproj | 64 +++---------------- 1 file changed, 9 insertions(+), 55 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj index e4158a8..6ca51e0 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.StructureMap/ProjectExtensions.Azure.ServiceBus.StructureMap.csproj @@ -1,77 +1,31 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {5C526602-9D47-4E02-B3A6-745E9D573994} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.StructureMap - ProjectExtensions.Azure.ServiceBus.StructureMap - v4.8 - 512 - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.StructureMap.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.StructureMap.XML - false - - - ..\..\packages\Unity.2.1.505.0\lib\NET35\Microsoft.Practices.Unity.dll - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + 4.7.1 + + + all + - - \ No newline at end of file From 1bf03386f57d3aedcf3eb91f4923fa81b8c9d685 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:14:24 -0500 Subject: [PATCH 20/26] upgrade ProjectExtensions.Azure.ServiceBus.Tests.Integration --- ....Azure.ServiceBus.Tests.Integration.csproj | 58 +++---------------- 1 file changed, 8 insertions(+), 50 deletions(-) diff --git a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj index 7b2ebfb..d1142cf 100644 --- a/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj +++ b/src/Tests/ProjectExtensions.Azure.ServiceBus.Tests.Integration/ProjectExtensions.Azure.ServiceBus.Tests.Integration.csproj @@ -1,54 +1,16 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {5CA360A8-B3D1-4470-BD73-11F96082E62C} + netstandard2.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.Tests.Integration - ProjectExtensions.Azure.ServiceBus.Tests.Integration - v4.8 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false - - - - - - - - - Properties\CommonAssemblyInfo.cs - + 4.18.4 @@ -58,13 +20,9 @@ 3.6.1 + + + all + - - \ No newline at end of file From 5c31ecc2b780a71a53f30aa77439b42a15a41c42 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:15:37 -0500 Subject: [PATCH 21/26] upgrade ProjectExtensions.Azure.ServiceBus.Unity --- ...ctExtensions.Azure.ServiceBus.Unity.csproj | 63 +++---------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj index c0ccf48..76961bc 100644 --- a/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj +++ b/src/ProjectExtensions.Azure.ServiceBus.Unity/ProjectExtensions.Azure.ServiceBus.Unity.csproj @@ -1,71 +1,26 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {B505DEAA-0CCA-4E26-9CA6-AB2820C85FC7} + net7.0 Library - Properties - ProjectExtensions.Azure.ServiceBus.Unity - ProjectExtensions.Azure.ServiceBus.Unity - v4.8 - 512 - + false - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 bin\Debug\ProjectExtensions.Azure.ServiceBus.Unity.XML - false - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\ProjectExtensions.Azure.ServiceBus.Unity.XML - false - - - - - - - - - - - - - - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + + 5.11.10 + + all + - - \ No newline at end of file From cff68b618ecbef2b1a62afe701621de3aebebcf4 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:17:38 -0500 Subject: [PATCH 22/26] upgrade PubSubUsingCastleWindsor --- .../PubSubUsingCastleWindsor.csproj | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj index 919afdb..1926b76 100644 --- a/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj +++ b/src/Samples/PubSubUsingCastleWindsor/PubSubUsingCastleWindsor.csproj @@ -1,53 +1,14 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {7635ABF3-31F7-408E-ACDB-FFDBE7DA6D10} + net7.0 Exe - Properties - PubSubUsingCastleWindsor - PubSubUsingCastleWindsor - v4.8 - - - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false PubSubUsingConfiguration.Program - - - - - - - - - @@ -68,8 +29,6 @@ TestMessageSubscriber.cs - - @@ -77,14 +36,8 @@ - - {69CAB6DE-C753-42F9-9E8F-935B975DBCA2} - ProjectExtensions.Azure.ServiceBus.CastleWindsor - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + @@ -93,6 +46,7 @@ 5.1.2 + 3.2.3 @@ -102,16 +56,15 @@ 5.1.3 + 6.2.2 + + + + + all + - - \ No newline at end of file From 15dea849357a17e5f8b3c74af6f0dd9035c9366f Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:20:08 -0500 Subject: [PATCH 23/26] upgrade PubSubUsingConfiguration --- .../PubSubUsingConfiguration.csproj | 89 ++++--------------- .../PubSubUsingConfiguration/appsettings.json | 6 ++ 2 files changed, 23 insertions(+), 72 deletions(-) create mode 100644 src/Samples/PubSubUsingConfiguration/appsettings.json diff --git a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj index 3a0e5ca..16ab6e9 100644 --- a/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj +++ b/src/Samples/PubSubUsingConfiguration/PubSubUsingConfiguration.csproj @@ -1,84 +1,26 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {2B545669-3B24-4805-B7B1-B7AA4E2B6A62} + net7.0 Exe - Properties - PubSubUsingConfiguration - PubSubUsingConfiguration - v4.8 - - - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false - - - - - - - - - - Properties\CommonAssemblyInfo.cs - - - - - - - - - - - - {11192756-9ABB-4C2B-8FE5-2DBD4DC0DC36} - ProjectExtensions.Azure.ServiceBus.Autofac - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - - - Designer - + + 7.0.1 + 3.2.3 @@ -88,16 +30,19 @@ 5.1.3 + 6.2.2 + + + + + + all + + + + - - \ No newline at end of file diff --git a/src/Samples/PubSubUsingConfiguration/appsettings.json b/src/Samples/PubSubUsingConfiguration/appsettings.json new file mode 100644 index 0000000..412708c --- /dev/null +++ b/src/Samples/PubSubUsingConfiguration/appsettings.json @@ -0,0 +1,6 @@ +{ + "ServiceBusApplicationId": "Test1234", + "ServiceBusIssuerKey": "[your secret]", + "ServiceBusIssuerName": "owner", + "ServiceBusNamespace": "[your namespace]" +} \ No newline at end of file From ab45eb303cc39c1eaf231557fa8e0caebf7699ce Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:22:10 -0500 Subject: [PATCH 24/26] upgrade PubSubUsingNinject --- .../PubSubUsingNinject.csproj | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj index b9d1df9..5eed3a9 100644 --- a/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj +++ b/src/Samples/PubSubUsingNinject/PubSubUsingNinject.csproj @@ -1,50 +1,11 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {E1182B9A-A509-4B56-AA80-7BD15D6B3D94} + net7.0 Exe - Properties - PubSubUsingNinject - PubSubUsingNinject - v4.8 - - - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false - - - - - - - - - @@ -65,18 +26,10 @@ TestMessageSubscriber.cs - - - - {18285A92-F031-45A5-97BB-FE3841DAB434} - ProjectExtensions.Azure.ServiceBus.Ninject - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + @@ -84,6 +37,7 @@ + 3.2.3 @@ -96,16 +50,15 @@ 5.1.3 + 6.2.2 + + + + + all + - - \ No newline at end of file From 1cbeeb2f70fca64f9143677670a16681666efac1 Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:24:05 -0500 Subject: [PATCH 25/26] upgrade PubSubUsingStructureMap --- .../PubSubUsingStructureMap.csproj | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj index 67516ec..c4c2d61 100644 --- a/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj +++ b/src/Samples/PubSubUsingStructureMap/PubSubUsingStructureMap.csproj @@ -1,53 +1,14 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {59099F13-9153-477B-A35A-B4AB9413DF32} + net7.0 Exe - Properties - PubSubUsingStructureMap - PubSubUsingStructureMap - v4.8 - - - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false PubSubUsingConfiguration.Program - - - - - - - - - @@ -68,8 +29,6 @@ TestMessageSubscriber.cs - - @@ -77,16 +36,11 @@ - - {5C526602-9D47-4E02-B3A6-745E9D573994} - ProjectExtensions.Azure.ServiceBus.StructureMap - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + + 3.2.3 @@ -99,16 +53,15 @@ 4.7.1 + 6.2.2 + + + + + all + - - \ No newline at end of file From 9ad004d14360cb9f8139b30552efbf7a1dcddcef Mon Sep 17 00:00:00 2001 From: Joe Feser Date: Thu, 4 May 2023 15:25:49 -0500 Subject: [PATCH 26/26] upgrade PubSubUsingUnity --- .../PubSubUsingUnity/PubSubUsingUnity.csproj | 73 ++++--------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj index f9415ae..b54dc91 100644 --- a/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj +++ b/src/Samples/PubSubUsingUnity/PubSubUsingUnity.csproj @@ -1,53 +1,14 @@ - - + - Debug - AnyCPU - 8.0.30703 - 2.0 - {9D506199-4F64-4446-85B7-88A7A598F322} + net7.0 Exe - Properties - PubSubUsingUnity - PubSubUsingUnity - v4.8 - - - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + false PubSubUsingConfiguration.Program - - - - - - - - - @@ -68,8 +29,6 @@ TestMessageSubscriber.cs - - @@ -77,16 +36,11 @@ - - {B505DEAA-0CCA-4E26-9CA6-AB2820C85FC7} - ProjectExtensions.Azure.ServiceBus.Unity - - - {8C8A8531-95AE-41CD-B2AC-6651F104245E} - ProjectExtensions.Azure.ServiceBus - + + + 3.2.3 @@ -96,19 +50,18 @@ 5.1.3 + 5.11.10 6.2.2 + + + + + all + - - \ No newline at end of file