├── .gitattributes ├── .gitignore ├── Build ├── EasyNetQ.proj └── UpdateGitVersion.ps1 ├── DatabaseScripts └── EasyNetQ.Scheduler │ ├── mssql │ ├── CreateWorkTables.sql │ ├── uspAddNewMessageToSchedule.sql │ ├── uspCancelScheduledMessages.sql │ ├── uspGetNextBatchOfMessages.sql │ ├── uspMarkWorkItemForPurge.sql │ └── uspWorkItemsSelfPurge.sql │ └── postgres │ ├── CreateWorkTables.sql │ ├── uspAddNewMessageToSchedule.sql │ ├── uspCancelScheduledMessages.sql │ ├── uspGetNextBatchOfMessages.sql │ ├── uspMarkWorkItemForPurge.sql │ └── uspWorkItemsSelfPurge.sql ├── GitVersion.yml ├── Package ├── EasyNetQ.DI.Autofac │ ├── EasyNetQ.DI.Autofac.nuspec │ └── lib │ │ └── net40 │ │ └── EasyNetQ.DI.Autofac.dll ├── EasyNetQ.DI.LightInject │ └── EasyNetQ.DI.LightInject.nuspec ├── EasyNetQ.DI.Ninject │ ├── EasyNetQ.DI.Ninject.nuspec │ └── lib │ │ └── net40 │ │ └── EasyNetQ.DI.Ninject.dll ├── EasyNetQ.DI.SimpleInjector │ └── EasyNetQ.DI.SimpleInjector.nuspec ├── EasyNetQ.DI.StructureMap │ ├── EasyNetQ.DI.StructureMap.nuspec │ └── lib │ │ └── net40 │ │ └── EasyNetQ.DI.StructureMap.dll ├── EasyNetQ.DI.Windsor │ ├── EasyNetQ.DI.Windsor.nuspec │ └── lib │ │ └── net40 │ │ └── EasyNetQ.DI.Windsor.dll ├── EasyNetQ.Serilog │ ├── EasyNetQ.Serilog.nuspec │ └── lib │ │ └── net40 │ │ └── EasyNetQ.Serilog.dll └── EasyNetQ │ └── EasyNetQ.nuspec ├── README.md ├── Source ├── EasyNetQ.DI.Autofac │ ├── AutofacAdapter.cs │ ├── AutofacMessageDispatcher.cs │ ├── EasyNetQ.DI.Autofac.xproj │ ├── InjectionExtensions.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── project.json ├── EasyNetQ.DI.LightInject │ ├── EasyNetQ.DI.LightInject.xproj │ ├── InjectionExtensions.cs │ ├── LightInjectAdapter.cs │ ├── LightInjectMessageDispatcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── project.json ├── EasyNetQ.DI.Ninject │ ├── EasyNetQ.DI.Ninject.xproj │ ├── InjectionExtensions.cs │ ├── NinjectAdapter.cs │ ├── NinjectMessageDispatcher.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── project.json ├── EasyNetQ.DI.SimpleInjector │ ├── EasyNetQ.DI.SimpleInjector.xproj │ ├── InjectionExtensions.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleInjectorAdapter.cs │ ├── SimpleInjectorMessageDispatcher.cs │ └── project.json ├── EasyNetQ.DI.StructureMap │ ├── EasyNetQ.DI.StructureMap.xproj │ ├── InjectionExtensions.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── StructureMapAdapter.cs │ ├── app.config │ └── project.json ├── EasyNetQ.DI.Tests │ ├── AutofacAdapterTests.cs │ ├── EasyNetQ.DI.Tests.xproj │ ├── LightInjectAdapterTests.cs │ ├── MockBuilder.cs │ ├── NinjectAdapterTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SimpleInjectorAdapterTests.cs │ ├── StructureMapAdapterTests.cs │ ├── StructureMapAdapterWithRegistryTests.cs │ ├── WindsorAdapterTests.cs │ ├── app.config │ └── project.json ├── EasyNetQ.DI.Windsor │ ├── EasyNetQ.DI.Windsor.xproj │ ├── InjectionExtensions.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── WindsorAdapter.cs │ ├── app.config │ └── project.json ├── EasyNetQ.Hosepipe.Setup │ ├── Debug │ │ ├── EasyNetQ.Hosepipe.Setup.msi │ │ └── setup.exe │ └── EasyNetQ.Hosepipe.Setup.vdproj ├── EasyNetQ.Hosepipe.SetupActions │ ├── EasyNetQ.Hosepipe.SetupActions.csproj │ ├── EasyNetQ.Hosepipe.SetupActions.xproj │ ├── HosepipeInstaller.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── EasyNetQ.Hosepipe.Tests │ ├── ArgParserTests.cs │ ├── EasyNetQ.Hosepipe.Tests.csproj │ ├── EasyNetQ.Hosepipe.Tests.xproj │ ├── ErrorMessageRepublishSpike.cs │ ├── ErrorRetryTests.cs │ ├── FileMessageWriterTests.cs │ ├── Helper.cs │ ├── MessageReaderTests.cs │ ├── ProgramIntegrationTests.cs │ ├── ProgramTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueueInsertionTests.cs │ ├── QueueRetrievalTests.cs │ ├── TestExtensions.cs │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Hosepipe │ ├── ArgParser.cs │ ├── EasyNetQ.Hosepipe.csproj │ ├── EasyNetQ.Hosepipe.xproj │ ├── EasyNetQHosepipeException.cs │ ├── ErrorRetry.cs │ ├── FileMessageWriter.cs │ ├── HosepipeConnection.cs │ ├── HosepipeMessage.cs │ ├── IErrorRetry.cs │ ├── IMessageReader.cs │ ├── IMessageWriter.cs │ ├── IQueueInsertion.cs │ ├── MessageReader.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueueInsertion.cs │ ├── QueueParameters.cs │ ├── QueueRetrieval.cs │ ├── Usage.txt │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.LogReader │ ├── EasyNetQ.LogReader.csproj │ ├── EasyNetQ.LogReader.xproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Scheduler.Mongo.Core │ ├── EasyNetQ.Scheduler.Mongo.Core.csproj │ ├── EasyNetQ.Scheduler.Mongo.Core.xproj │ ├── IScheduleRepositoryConfiguration.cs │ ├── ISchedulerService.cs │ ├── ISchedulerServiceConfiguration.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Schedule.cs │ ├── ScheduleRepository.cs │ ├── ScheduleState.cs │ ├── SchedulerService.cs │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Scheduler.Mongo.Tests │ ├── EasyNetQ.Scheduler.Mongo.Tests.csproj │ ├── EasyNetQ.Scheduler.Mongo.Tests.xproj │ ├── MockScheduleRepository.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ScheduleRepositoryTests.cs │ ├── SchedulerServiceTests.cs │ ├── TestExtensions.cs │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Scheduler.Mongo │ ├── ConfigurationBase.cs │ ├── EasyNetQ.Scheduler.Mongo.csproj │ ├── EasyNetQ.Scheduler.Mongo.xproj │ ├── Logger.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ScheduleRepositoryConfiguration.cs │ ├── SchedulerServiceConfiguration.cs │ ├── SchedulerServiceFactory.cs │ ├── app.config │ ├── log4net.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Scheduler.Tests │ ├── EasyNetQ.Scheduler.Tests.csproj │ ├── EasyNetQ.Scheduler.Tests.xproj │ ├── MockScheduleRepository.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ScheduleRepositoryTests.cs │ ├── SchedulerServiceTests.cs │ ├── TestExtensions.cs │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Scheduler │ ├── ConfigurationBase.cs │ ├── EasyNetQ.Scheduler.csproj │ ├── EasyNetQ.Scheduler.xproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── ScheduleRepository.cs │ ├── ScheduleRepositoryConfiguration.cs │ ├── SchedulerService.cs │ ├── SchedulerServiceConfiguration.cs │ ├── SchedulerServiceFactory.cs │ ├── SqlDialect.cs │ ├── app.config │ ├── log4net.config │ ├── packages.config │ └── project.json ├── EasyNetQ.Serilog │ ├── EasyNetQ.Serilog.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── SerilogLogger.cs │ ├── app.config │ └── project.json ├── EasyNetQ.Tests.Common │ ├── EasyNetQ.Tests.Common.xproj │ ├── Messages.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Traits │ │ ├── Category.cs │ │ ├── CategoryAttribute.cs │ │ ├── CategoryDiscoverer.cs │ │ ├── ExplicitAttribute.cs │ │ └── IntegrationAttribute.cs │ └── project.json ├── EasyNetQ.Tests.Performance.Consumer │ └── app.config ├── EasyNetQ.Tests.Performance.Producer │ └── app.config ├── EasyNetQ.Tests.SimpleRequester │ └── app.config ├── EasyNetQ.Tests.Tasks │ ├── App.config │ ├── CommandLineTaskRunner.cs │ ├── EasyNetQ.Tests.Tasks.csproj │ ├── EasyNetQ.Tests.Tasks.csproj.DotSettings │ ├── EasyNetQ.Tests.Tasks.xproj │ ├── NoDebugLogger.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Tasks │ │ ├── SimpleRequester │ │ │ ├── ILatencyRecorder.cs │ │ │ ├── LatencyRecorder.cs │ │ │ └── SimpleRequester.cs │ │ ├── TestConsumeMultipleMessageTypesFromSingleQueue.cs │ │ ├── TestPerformanceConsumer.cs │ │ ├── TestPerformanceProducer.cs │ │ ├── TestScheduledMessages.cs │ │ └── TestSimpleService.cs │ ├── packages.config │ └── project.json ├── EasyNetQ.Tests │ ├── AdvancedBusEventHandlersTests.cs │ ├── AmqpExceptionParserTests.cs │ ├── AutoSubscriberTests │ │ ├── When_autosubscribing.cs │ │ ├── When_autosubscribing_with_assembly_scanning.cs │ │ ├── When_autosubscribing_with_subscription_configuration.cs │ │ ├── When_autosubscribing_with_subscription_configuration_action.cs │ │ ├── When_autosubscribing_with_subscription_configuration_action_and_attribute.cs │ │ └── When_autosubscribing_with_subscription_configuration_attribute_no_expires.cs │ ├── BlockedConnectionNotificationTests.cs │ ├── ClientCommandDispatcherTests │ │ ├── When_an_action_is_invoked.cs │ │ └── When_an_action_is_invoked_that_throws.cs │ ├── ConnectionConfigurationTests.cs │ ├── ConnectionFactoryWrapperTests.cs │ ├── ConnectionString │ │ ├── ConnectionStringGrammarTests.cs │ │ └── ConnectionStringParserTests.cs │ ├── ConnectionStringTests.cs │ ├── ConsumeTests │ │ ├── AckStrategyTests.cs │ │ ├── ConsumerTestBase.cs │ │ ├── HandlerCollectionTests.cs │ │ ├── When_a_consumer_has_multiple_handlers.cs │ │ ├── When_a_consumer_is_cancelled_by_the_broker.cs │ │ ├── When_a_consumer_is_cancelled_by_the_user.cs │ │ ├── When_a_message_is_delivered_to_the_consumer.cs │ │ ├── When_a_message_is_received.cs │ │ ├── When_a_polymorphic_message_is_delivered_to_the_consumer.cs │ │ ├── When_an_error_occurs_in_the_message_handler.cs │ │ ├── When_cancellation_of_message_handler_occurs.cs │ │ └── When_consume_is_called.cs │ ├── ConsumerDispatcherFactoryTests.cs │ ├── ConventionsTests.cs │ ├── DefaultMessageConsumerTests.cs │ ├── DefaultMessageSerializationStrategyTests.cs │ ├── DefaultServiceProviderTests.cs │ ├── DeliveryModeStrategyTest.cs │ ├── EasyNetQ.Tests.xproj │ ├── EventBusTests.cs │ ├── ExchangeQueueBindingTests.cs │ ├── FluentConfiguration │ │ └── PublishConfigurationTests.cs │ ├── HandlerRunnerTests │ │ └── When_a_user_handler_is_executed.cs │ ├── Integration │ │ ├── AdvancedApiExamples.cs │ │ ├── AdvancedApiPingPongTest.cs │ │ ├── AdvancedApiPingPongTest_with_transient_queue.cs │ │ ├── AdvancedApiTransientQueueTests.cs │ │ ├── AdvancedBusTests.cs │ │ ├── AmqpStringSizeExperiments.cs │ │ ├── AutoSubscriberIntegrationTests.cs │ │ ├── ChannelExceptionBug.cs │ │ ├── ClientCommandDispatcherTests.cs │ │ ├── ClusterTests.cs │ │ ├── ConnectionErrorConditionsTests.cs │ │ ├── ConsumerErrorConditionsTests.cs │ │ ├── ConsumerShutdownTests.cs │ │ ├── DefaultConsumerErrorStrategyTests.cs │ │ ├── DeleteQueueWhileConsuming.cs │ │ ├── ExceptionConditionsTests.cs │ │ ├── Helpers.cs │ │ ├── LongRunningServer.js │ │ ├── MultiThreadedPublisherTests.cs │ │ ├── MultipleHandlerPerConsumerTests.cs │ │ ├── NonGenericExtensionsIntegrationTests.cs │ │ ├── PersistentChannelTests.cs │ │ ├── PolymorphicPubSub.cs │ │ ├── PolymorphicRpc.cs │ │ ├── PublishSubscribeTests.cs │ │ ├── PublishSubscribeWithInterceptionTest.cs │ │ ├── PublishSubscribeWithTopicsTests.cs │ │ ├── PublisherConfirmsIntegrationTests.cs │ │ ├── RequestResponseTests.cs │ │ ├── RpcTests.cs │ │ ├── Scheduling │ │ │ ├── DeadLetterExchangeAndMessageTtlSchedulerTests.cs │ │ │ ├── DelayedExchangeSchedulerTests.cs │ │ │ ├── ExternalSchedulerTests.cs │ │ │ └── PartyInvitation.cs │ │ ├── SendReceiveIntegrationTests.cs │ │ ├── SimpleSagaSpike.cs │ │ ├── SubscribeAsyncTests.cs │ │ ├── SubscribeToErrorQueueSpike.cs │ │ ├── SubscribeWithExpiresTests.cs │ │ ├── SubscriberOfSpike.cs │ │ └── When_a_message_with_a_long_type_name_is_published.cs │ ├── Interception │ │ ├── BuildInInterceptorsTests.cs │ │ └── InterceptionExtensionsTests.cs │ ├── Internals │ │ └── AsyncSemaphoreTest.cs │ ├── JsonSerializerTests.cs │ ├── MessageFactoryTests.cs │ ├── MessagePropertiesTests.cs │ ├── MessageVersioningTests │ │ ├── MessageTypePropertyTests.cs │ │ ├── MessageVersionStackTests.cs │ │ ├── MessageVersioningExtensionsTests.cs │ │ ├── MyMessageV2.cs │ │ ├── VersionedMessageSerializationStrategyTests.cs │ │ └── VersionedPublishExchangeDeclareStrategyTests.cs │ ├── MessageWithVeryVEryVEryLongNameThatWillMostCertainlyBreakAmqpsSilly255CharacterNameLimitThatIsAlmostCertainToBeReachedWithGenericTypes.cs │ ├── Mocking │ │ └── MockBuilder.cs │ ├── ModelCleanupTests.cs │ ├── MultipleExchangeTest │ │ ├── IMessageInterfaceOne.cs │ │ ├── IMessageInterfaceTwo.cs │ │ ├── MessageWithTwoInterfaces.cs │ │ └── MultipleExchangePublishExchangeDeclareStrategyTests.cs │ ├── NonGeneric │ │ └── NonGenericExtensionsTests.cs │ ├── OrderedClusterHostSelectionStrategyTests.cs │ ├── PersistentChannelTests │ │ ├── When_a_ConnectionCreatedEvent_is_published.cs │ │ ├── When_a_channel_action_is_invoked.cs │ │ ├── When_an_action_is_performed_on_a_closed_channel_that_doesnt_open_again.cs │ │ └── When_an_action_is_performed_on_a_closed_channel_that_then_opens.cs │ ├── PersistentConnectionTests.cs │ ├── PersistentConsumerTests │ │ ├── Given_a_PersistentConsumer.cs │ │ ├── When_a_Persistent_consumer_is_created.cs │ │ ├── When_disposed.cs │ │ └── When_the_connection_is_broken.cs │ ├── ProducerTests │ │ ├── PublishConfirmationListenerTest.cs │ │ ├── PublishExchangeDeclareStrategyTests.cs │ │ ├── When_IModel_throws.cs │ │ ├── When_a_message_is_sent.cs │ │ ├── When_a_polymorphic_message_is_sent.cs │ │ ├── When_a_request_is_sent.cs │ │ ├── When_a_request_is_sent_but_an_exception_is_thrown_by_responder.cs │ │ ├── When_a_request_is_sent_but_no_reply_is_received.cs │ │ └── When_a_request_is_sent_but_the_connection_closes_before_a_reply_is_received.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── PublishTests.cs │ ├── RabbitHutchTests.cs │ ├── RandomClusterHostSelectionStrategyTests.cs │ ├── ReflectionHelpersTests.cs │ ├── Scheduling │ │ └── SchedulingExtensionsTests.cs │ ├── StubCorrelationIdGenerator.cs │ ├── SubscribeTests.cs │ ├── TestExtensions.cs │ ├── TestMessage.cs │ ├── TimeoutStrategyTest.cs │ ├── TypeNameSerializerTests.cs │ ├── app.config │ └── project.json ├── EasyNetQ.Trace │ ├── CSVFile.cs │ ├── EasyNetQ.Trace.csproj │ ├── EasyNetQ.Trace.xproj │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Readme.md │ ├── app.config │ ├── packages.config │ └── project.json ├── EasyNetQ.sln ├── EasyNetQ.sln.DotSettings ├── EasyNetQ │ ├── AdvancedBusEventHandlers.cs │ ├── AmqpExceptions │ │ ├── AmpqExceptionGrammar.cs │ │ └── AmqpException.cs │ ├── AutoSubscribe │ │ ├── AutoSubscriber.cs │ │ ├── AutoSubscriberConsumerAttribute.cs │ │ ├── AutoSubscriberConsumerInfo.cs │ │ ├── DefaultAutoSubscriberMessageDispatcher.cs │ │ ├── ForTopicAttribute.cs │ │ ├── IAutoSubscriberMessageDispatcher.cs │ │ ├── IConsume.cs │ │ ├── IConsumeAsync.cs │ │ └── SubscriptionConfigurationAttribute.cs │ ├── BasicGetResult.cs │ ├── ComponentRegistration.cs │ ├── ConnectionConfiguration.cs │ ├── ConnectionString │ │ ├── ConnectionStringGrammar.cs │ │ └── IConnectionStringParser.cs │ ├── Consumer │ │ ├── AckStrategies.cs │ │ ├── Base64ErrorMessageSerializer.cs │ │ ├── ConsumerCancellation.cs │ │ ├── ConsumerDispatcher.cs │ │ ├── ConsumerDispatcherFactory.cs │ │ ├── ConsumerExecutionContext.cs │ │ ├── ConsumerFactory.cs │ │ ├── DefaultConsumerErrorStrategy.cs │ │ ├── DefaultErrorMessageSerializer.cs │ │ ├── ExclusiveConsumer.cs │ │ ├── HandlerCollection.cs │ │ ├── HandlerCollectionFactory.cs │ │ ├── HandlerCollectionPerQueueFactory.cs │ │ ├── HandlerRunner.cs │ │ ├── IConsumer.cs │ │ ├── IConsumerConfiguration.cs │ │ ├── IConsumerDispatcher.cs │ │ ├── IConsumerDispatcherFactory.cs │ │ ├── IConsumerErrorStrategy.cs │ │ ├── IConsumerFactory.cs │ │ ├── IErrorMessageSerializer.cs │ │ ├── IHandlerCollectionFactory.cs │ │ ├── IHandlerRegistration.cs │ │ ├── IReceiveRegistration.cs │ │ ├── InternalConsumer.cs │ │ ├── InternalConsumerFactory.cs │ │ ├── PersistentConsumer.cs │ │ ├── PersistentMultipleConsumer.cs │ │ ├── StartConsumingStatus.cs │ │ └── TransientConsumer.cs │ ├── Conventions.cs │ ├── DefaultCorrelationIdGenerationStrategy.cs │ ├── DefaultMessageSerializationStrategy.cs │ ├── DefaultServiceProvider.cs │ ├── DeliveryModeAttribute.cs │ ├── EasyNetQ.xproj │ ├── EasyNetQException.cs │ ├── Events │ │ ├── AckEvent.cs │ │ ├── ConnectionBlockedEvent.cs │ │ ├── ConnectionCreatedEvent.cs │ │ ├── ConnectionDisconnectedEvent.cs │ │ ├── ConnectionUnblockedEvent.cs │ │ ├── ConsumerModelDisposedEvent.cs │ │ ├── DeliveredMessageEvent.cs │ │ ├── MessageConfirmationEvent.cs │ │ ├── PublishChannelCreatedEvent.cs │ │ ├── PublishedMessageEvent.cs │ │ ├── ReturnedMessageEvent.cs │ │ ├── StartConsumingFailedEvent.cs │ │ ├── StartConsumingSucceededEvent.cs │ │ └── StoppedConsumingEvent.cs │ ├── Extensions.cs │ ├── FluentConfiguration │ │ ├── IPublishConfiguration.cs │ │ └── ISubscriptionConfiguration.cs │ ├── IAdvancedBus.cs │ ├── IBus.cs │ ├── IClusterHostSelectionStrategy.cs │ ├── IConnectionFactory.cs │ ├── ICorrelationIdGenerationStrategy.cs │ ├── IEasyNetQLogger.cs │ ├── IEventBus.cs │ ├── IMessage.cs │ ├── IMessageSerializationStrategy.cs │ ├── IPersistentConnectionFactory.cs │ ├── ISerializer.cs │ ├── IServiceProvider.cs │ ├── ISubscriptionResult.cs │ ├── ITimeoutStrategy.cs │ ├── Interception │ │ ├── CompositeInterceptor.cs │ │ ├── DefaultInterceptor.cs │ │ ├── GZipInterceptor.cs │ │ ├── IProduceConsumeInterceptor.cs │ │ ├── InterceptionExtensions.cs │ │ ├── InterceptorRegistrator.cs │ │ ├── RawMessage.cs │ │ └── TripleDESInterceptor.cs │ ├── Internals │ │ ├── AsyncSemaphore.cs │ │ └── TaskHelpers.cs │ ├── JsonSerializer.cs │ ├── LinqExtensions.cs │ ├── Loggers │ │ ├── ConsoleLogger.cs │ │ ├── DelegateLogger.cs │ │ └── NullLogger.cs │ ├── MessageDeliveryMode.cs │ ├── MessageDeliveryModeStrategy.cs │ ├── MessageFactory.cs │ ├── MessageProperties.cs │ ├── MessageReceivedInfo.cs │ ├── MessageReturnedEventArgs.cs │ ├── MessageReturnedInfo.cs │ ├── MessageVersioning │ │ ├── ISupersede.cs │ │ ├── MessageType.cs │ │ ├── MessageTypeProperty.cs │ │ ├── MessageVersionStack.cs │ │ ├── MessageVersioningExtensions.cs │ │ ├── VersionedMessageSerializationStrategy.cs │ │ └── VersionedPublishExchangeDeclareStrategy.cs │ ├── MultipleExchange │ │ ├── MultipleExchangeExtension.cs │ │ └── MultipleExchangePublishExchangeDeclareStrategy.cs │ ├── NonGeneric │ │ └── NonGenericExtensions.cs │ ├── OrderedClusterHostSelectionStrategy.cs │ ├── PersistentConnection.cs │ ├── PersistentConnectionFactory.cs │ ├── Preconditions.cs │ ├── Producer │ │ ├── ClientCommandDispatcher.cs │ │ ├── ClientCommandDispatcherSingleton.cs │ │ ├── IClientCommandDispatcher.cs │ │ ├── IClientCommandDispatcherFactory.cs │ │ ├── IPersistentChannel.cs │ │ ├── IPersistentChannelFactory.cs │ │ ├── IPublishConfirmationListener.cs │ │ ├── IPublishConfirmationWaiter.cs │ │ ├── IPublishExchangeDeclareStrategy.cs │ │ ├── IResponderConfiguration.cs │ │ ├── IRpc.cs │ │ ├── ISendReceive.cs │ │ ├── PersistentChannel.cs │ │ ├── PublishConfirmationListener.cs │ │ ├── PublishConfirmationWaiter.cs │ │ ├── PublishExchangeDeclareStrategy.cs │ │ ├── PublishInterruptedException.cs │ │ ├── PublishNackedException.cs │ │ ├── Rpc.cs │ │ └── SendReceive.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueueAttribute.cs │ ├── QueueConsumerPair.cs │ ├── RabbitAdvancedBus.cs │ ├── RabbitBus.cs │ ├── RabbitHutch.cs │ ├── RandomClusterHostSelectionStrategy.cs │ ├── ReflectionHelpers.cs │ ├── Scheduling │ │ ├── BusExtensions.cs │ │ ├── DeadLetterExchangeAndMessageTtlScheduler.cs │ │ ├── DelayedExchangeScheduler.cs │ │ ├── ExternalScheduler.cs │ │ ├── IScheduler.cs │ │ └── SchedulingExtensions.cs │ ├── Sprache │ │ ├── Failure.cs │ │ ├── IFailure.cs │ │ ├── IResultOfT.cs │ │ ├── ISuccess.cs │ │ ├── Input.cs │ │ ├── Parse.cs │ │ ├── ParseException.cs │ │ ├── ParserOfT.cs │ │ ├── ResultHelper.cs │ │ └── Success.cs │ ├── SubscriptionResult.cs │ ├── SystemMessages │ │ ├── Error.cs │ │ ├── ScheduleMe.cs │ │ └── UnscheduleMe.cs │ ├── TimeBudget.cs │ ├── TimeoutSecondsAttribute.cs │ ├── Topology │ │ ├── Binding.cs │ │ ├── Exchange.cs │ │ ├── ExchangeType.cs │ │ ├── IBindable.cs │ │ ├── IBinding.cs │ │ ├── IExchange.cs │ │ ├── IQueue.cs │ │ └── Queue.cs │ ├── TypeNameSerializer.cs │ └── project.json ├── NuGet.Config ├── Version.cs └── build-core.bat ├── Tools ├── ILRepack │ └── ILRepack.exe ├── MSBuildCommunityTasks │ ├── MSBuild.Community.Tasks.Targets │ ├── MSBuild.Community.Tasks.dll │ ├── MSBuild.Community.Tasks.pdb │ ├── MSBuild.Community.Tasks.xml │ └── MSBuild.Community.Tasks.xsd ├── NUnit │ └── 2.5 │ │ ├── TestDriven.Framework.dll │ │ ├── addins.txt │ │ ├── framework │ │ ├── nunit.framework.dll │ │ ├── nunit.framework.dll.tdnet │ │ └── nunit.framework.xml │ │ ├── lib │ │ ├── nunit-console-runner.dll │ │ ├── nunit-gui-runner.dll │ │ ├── nunit.core.dll │ │ ├── nunit.core.interfaces.dll │ │ ├── nunit.uiexception.dll │ │ ├── nunit.uikit.dll │ │ └── nunit.util.dll │ │ ├── license.txt │ │ ├── nunit-agent-x86.exe │ │ ├── nunit-agent-x86.exe.config │ │ ├── nunit-agent.exe │ │ ├── nunit-agent.exe.config │ │ ├── nunit-console-x86.exe │ │ ├── nunit-console-x86.exe.config │ │ ├── nunit-console.exe │ │ ├── nunit-console.exe.config │ │ ├── nunit-x86.exe │ │ ├── nunit-x86.exe.config │ │ ├── nunit.exe │ │ ├── nunit.exe.config │ │ └── nunit.tdnet.dll └── NuGet │ └── NuGet.exe ├── appveyor.gitversion.yml ├── appveyor.yml ├── build.bat ├── global.json ├── hall_of_fame.md └── licence.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/mssql/uspCancelScheduledMessages.sql: -------------------------------------------------------------------------------- 1 | SET ANSI_NULLS ON 2 | GO 3 | SET QUOTED_IDENTIFIER ON 4 | GO 5 | 6 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[uspCancelScheduledMessages]') AND type_desc IN ('SQL_STORED_PROCEDURE')) 7 | BEGIN 8 | PRINT 'Dropping procedure [dbo].[uspCancelScheduledMessages]' 9 | DROP PROCEDURE [dbo].[uspCancelScheduledMessages] 10 | END 11 | GO 12 | 13 | PRINT 'Creating procedure [dbo].[uspCancelScheduledMessages]' 14 | GO 15 | 16 | CREATE PROCEDURE [dbo].[uspCancelScheduledMessages] 17 | @CancellationKey NVARCHAR(255) 18 | AS 19 | 20 | DELETE FROM WorkItems WHERE CancellationKey = @CancellationKey -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/mssql/uspMarkWorkItemForPurge.sql: -------------------------------------------------------------------------------- 1 | SET ANSI_NULLS ON 2 | GO 3 | SET QUOTED_IDENTIFIER ON 4 | GO 5 | 6 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[uspMarkWorkItemForPurge]') AND type_desc IN ('SQL_STORED_PROCEDURE')) 7 | BEGIN 8 | PRINT 'Dropping procedure [dbo].[uspMarkWorkItemForPurge]' 9 | DROP PROCEDURE [dbo].[uspMarkWorkItemForPurge] 10 | END 11 | GO 12 | 13 | PRINT 'Creating procedure [dbo].[uspMarkWorkItemForPurge]' 14 | GO 15 | 16 | CREATE PROCEDURE [dbo].[uspMarkWorkItemForPurge] 17 | @ID INT = 0, @purgeDate datetime = NULL 18 | 19 | AS 20 | 21 | -- Performs the UPDATE and OUTPUTs the INSERTED. fields to the calling app 22 | UPDATE WorkItemStatus 23 | SET PurgeDate = @purgeDate 24 | OUTPUT INSERTED.WorkItemID, INSERTED.purgeDate 25 | FROM WorkItemStatus ws 26 | WHERE WorkItemID = @ID 27 | -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/mssql/uspWorkItemsSelfPurge.sql: -------------------------------------------------------------------------------- 1 | SET ANSI_NULLS ON 2 | GO 3 | SET QUOTED_IDENTIFIER ON 4 | GO 5 | 6 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[uspWorkItemsSelfPurge]') AND type_desc IN ('SQL_STORED_PROCEDURE')) 7 | BEGIN 8 | PRINT 'Dropping procedure [dbo].[uspWorkItemsSelfPurge]' 9 | DROP PROCEDURE [dbo].[uspWorkItemsSelfPurge] 10 | END 11 | GO 12 | 13 | PRINT 'Creating procedure [dbo].[uspWorkItemsSelfPurge]' 14 | GO 15 | 16 | CREATE Procedure [dbo].[uspWorkItemsSelfPurge] @rows SmallINT = 5, @purgeDate DateTime = NULL 17 | 18 | AS 19 | 20 | -- Only execute if there is work to do and continue 21 | -- until all records with a PurgeDate <= now are deleted 22 | WHILE EXISTS(SELECT * FROM WorkItemStatus WHERE PurgeDate <= @purgeDate) 23 | BEGIN 24 | -- NB: the FK in WorkItemStatus has ON DELETE CASCADE, 25 | -- so it will delete corresponding rows automatically 26 | DELETE TOP (@rows) WorkItems 27 | FROM WorkItems wi 28 | INNER JOIN WorkItemStatus ws 29 | ON wi.WorkItemID = ws.WorkItemID 30 | WHERE ws.PurgeDate <= @purgeDate 31 | END -- WHILE EXISTS() 32 | 33 | -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/CreateWorkTables.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/CreateWorkTables.sql -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/uspAddNewMessageToSchedule.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/uspAddNewMessageToSchedule.sql -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/uspCancelScheduledMessages.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/uspCancelScheduledMessages.sql -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/uspGetNextBatchOfMessages.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/uspGetNextBatchOfMessages.sql -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/uspMarkWorkItemForPurge.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/uspMarkWorkItemForPurge.sql -------------------------------------------------------------------------------- /DatabaseScripts/EasyNetQ.Scheduler/postgres/uspWorkItemsSelfPurge.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/DatabaseScripts/EasyNetQ.Scheduler/postgres/uspWorkItemsSelfPurge.sql -------------------------------------------------------------------------------- /GitVersion.yml: -------------------------------------------------------------------------------- 1 | assembly-versioning-scheme: MajorMinorPatch 2 | next-version: 2.0.4 3 | mode: ContinuousDelivery 4 | branches: 5 | master: 6 | mode: ContinuousDelivery 7 | features?[/-]: 8 | mode: ContinuousDeployment 9 | ignore: 10 | sha: [] -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Autofac/EasyNetQ.DI.Autofac.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.Autofac 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.Autofac 8 | Wiebe Tijsma, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use Autofac as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2015 18 | RabbitMQ Messaging AMQP REST API Autofac 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Autofac/lib/net40/EasyNetQ.DI.Autofac.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Package/EasyNetQ.DI.Autofac/lib/net40/EasyNetQ.DI.Autofac.dll -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.LightInject/EasyNetQ.DI.LightInject.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.LightInject 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.LightInject 8 | Jeff Doolittle, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use LightInject as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2016 18 | RabbitMQ Messaging AMQP REST API LightInject 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Ninject/EasyNetQ.DI.Ninject.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.Ninject 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.Ninject 8 | Jeff Doolittle, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use Ninject as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2015 18 | RabbitMQ Messaging AMQP REST API Ninject 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Ninject/lib/net40/EasyNetQ.DI.Ninject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Package/EasyNetQ.DI.Ninject/lib/net40/EasyNetQ.DI.Ninject.dll -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.SimpleInjector/EasyNetQ.DI.SimpleInjector.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.SimpleInjector 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.SimpleInjector 8 | Jeff Doolittle, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use SimpleInjector as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2015 18 | RabbitMQ Messaging AMQP REST API SimpleInjector 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.StructureMap/EasyNetQ.DI.StructureMap.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.StructureMap 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.StructureMap 8 | Jeff Doolittle, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use StructureMap as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2013 18 | RabbitMQ Messaging AMQP REST API StructureMap 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.StructureMap/lib/net40/EasyNetQ.DI.StructureMap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Package/EasyNetQ.DI.StructureMap/lib/net40/EasyNetQ.DI.StructureMap.dll -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Windsor/EasyNetQ.DI.Windsor.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.DI.Windsor 5 | 6 | 1.0.0.0 7 | EasyNetQ.DI.Windsor 8 | Jeff Doolittle, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Using-Alternative-DI-Containers 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An adaptor to allow EasyNetQ to use Castle.Windsor as its internal IoC container 15 | 16 | 17 | Copyright Mike Hadlow 2015 18 | RabbitMQ Messaging AMQP REST API Windsor 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Package/EasyNetQ.DI.Windsor/lib/net40/EasyNetQ.DI.Windsor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Package/EasyNetQ.DI.Windsor/lib/net40/EasyNetQ.DI.Windsor.dll -------------------------------------------------------------------------------- /Package/EasyNetQ.Serilog/EasyNetQ.Serilog.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ.Serilog 5 | 6 | 1.0.0.0 7 | EasyNetQ.Serilog 8 | Wiebe Tijsma, Mike Hadlow 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | https://github.com/EasyNetQ/EasyNetQ/wiki/Logging 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | An Implementation to use Serilog as a logging component for EasyNetQ 15 | 16 | 17 | Copyright Wiebe Tijsma 2015 18 | RabbitMQ Messaging AMQP REST API Serilog 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Package/EasyNetQ.Serilog/lib/net40/EasyNetQ.Serilog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Package/EasyNetQ.Serilog/lib/net40/EasyNetQ.Serilog.dll -------------------------------------------------------------------------------- /Package/EasyNetQ/EasyNetQ.nuspec: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | EasyNetQ 5 | 6 | 1.0.0.0 7 | EasyNetQ 8 | Mike Hadlow, Contributors (see GitHub repo) 9 | Mike Hadlow 10 | https://github.com/EasyNetQ/EasyNetQ/blob/master/licence.txt 11 | http://easynetq.com/ 12 | https://raw.githubusercontent.com/EasyNetQ/EasyNetQ/gh-pages/design/logo_design.png 13 | false 14 | EasyNetQ is a simple, opinionated .NET API for RabbitMQ 15 | 16 | 17 | Copyright Mike Hadlow 2015 18 | RabbitMQ Messaging AMQP 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Autofac/EasyNetQ.DI.Autofac.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 9d8e2017-010d-4a62-8634-cb702a99d6be 10 | EasyNetQ.DI.Autofac2 11 | .\obj 12 | .\bin\ 13 | v4.6.1 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Autofac/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Autofac; 3 | 4 | namespace EasyNetQ.DI 5 | { 6 | public static class InjectionExtensions 7 | { 8 | public static Autofac.IContainer RegisterAsEasyNetQContainerFactory(this ContainerBuilder builder, Func busCreator) 9 | { 10 | var adapter = new AutofacAdapter(builder); 11 | 12 | RabbitHutch.SetContainerFactory(() => adapter); 13 | 14 | var container = adapter.Container; 15 | 16 | var bus = busCreator(); 17 | 18 | adapter.Register(provider => bus); 19 | 20 | return container; 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Autofac/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.DI.Autofac")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("EasyNetQ")] 11 | [assembly: AssemblyProduct("EasyNetQ.DI.Autofac")] 12 | [assembly: AssemblyCopyright("Copyright © EasyNetQ 2013")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("48a6ab6e-90a4-4712-a00b-f12059871681")] 23 | [assembly: AssemblyVersion("2.0.4.0")] 24 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 25 | [assembly: AssemblyFileVersion("2.0.4.0")] 26 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Autofac/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.LightInject/EasyNetQ.DI.LightInject.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | caa56dec-6d0c-4141-b7dc-66db1bb1ef72 11 | EasyNetQ.DI.LightInject 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.LightInject/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using LightInject; 2 | 3 | namespace EasyNetQ.DI 4 | { 5 | public static class InjectionExtensions 6 | { 7 | public static void RegisterAsEasyNetQContainerFactory(this IServiceContainer container) 8 | { 9 | RabbitHutch.SetContainerFactory(() => new LightInjectAdapter(container)); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.LightInject/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.DI.LightInject")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("caa56dec-6d0c-4141-b7dc-66db1bb1ef72")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.LightInject/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Ninject/EasyNetQ.DI.Ninject.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | d293e3b3-d90f-4161-9987-1b9f1b880d83 11 | EasyNetQ.DI.Ninject 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Ninject/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using Ninject; 2 | 3 | namespace EasyNetQ.DI 4 | { 5 | public static class InjectionExtensions 6 | { 7 | public static void RegisterAsEasyNetQContainerFactory(this IKernel container) 8 | { 9 | RabbitHutch.SetContainerFactory(() => new NinjectAdapter(container)); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Ninject/NinjectMessageDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using EasyNetQ.AutoSubscribe; 3 | using Ninject; 4 | 5 | namespace EasyNetQ.DI 6 | { 7 | public class NinjectMessageDispatcher : IAutoSubscriberMessageDispatcher 8 | { 9 | private readonly IKernel _kernel; 10 | 11 | public NinjectMessageDispatcher(IKernel kernel) 12 | { 13 | this._kernel = kernel; 14 | } 15 | 16 | public void Dispatch(TMessage message) 17 | where TMessage : class 18 | where TConsumer : IConsume 19 | { 20 | _kernel.Get().Consume(message); 21 | } 22 | 23 | public Task DispatchAsync(TMessage message) 24 | where TMessage : class 25 | where TConsumer : IConsumeAsync 26 | { 27 | var consumer = _kernel.Get(); 28 | var tsc = new TaskCompletionSource(); 29 | consumer 30 | .Consume(message) 31 | .ContinueWith(task => 32 | { 33 | if (task.IsFaulted && task.Exception != null) 34 | { 35 | tsc.SetException(task.Exception); 36 | } 37 | else 38 | { 39 | tsc.SetResult(null); 40 | } 41 | }); 42 | 43 | return tsc.Task; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Ninject/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.DI.Ninject")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("d293e3b3-d90f-4161-9987-1b9f1b880d83")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Ninject/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.SimpleInjector/EasyNetQ.DI.SimpleInjector.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 48c6e960-a3fc-48a1-97b4-6173a348d0fc 11 | EasyNetQ.DI.SimpleInjector 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.SimpleInjector/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using SimpleInjector; 2 | 3 | namespace EasyNetQ.DI 4 | { 5 | public static class InjectionExtensions 6 | { 7 | public static void RegisterAsEasyNetQContainerFactory(this Container container) 8 | { 9 | RabbitHutch.SetContainerFactory(() => new SimpleInjectorAdapter(container)); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.SimpleInjector/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.DI.SimpleInjector")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("48c6e960-a3fc-48a1-97b4-6173a348d0fc")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.StructureMap/EasyNetQ.DI.StructureMap.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 0ebe99ee-56d8-47c0-9ed6-c6bcc88c4453 11 | EasyNetQ.DI.StructureMap 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.StructureMap/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.DI 2 | { 3 | public static class InjectionExtensions 4 | { 5 | public static void RegisterAsEasyNetQContainerFactory(this StructureMap.IContainer container) 6 | { 7 | RabbitHutch.SetContainerFactory(() => new StructureMapAdapter(container)); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.StructureMap/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.DI.StructureMap")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("0ebe99ee-56d8-47c0-9ed6-c6bcc88c4453")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.StructureMap/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Tests/EasyNetQ.DI.Tests.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0.25420 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 76a3a0c3-10d8-465f-9aca-5d0d3f61b445 10 | EasyNetQ.DI.Tests 11 | .\obj 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Windsor/EasyNetQ.DI.Windsor.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 456ad3ec-2759-4054-a31a-35ea086493e3 11 | EasyNetQ.DI.Windsor 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Windsor/InjectionExtensions.cs: -------------------------------------------------------------------------------- 1 | using Castle.Windsor; 2 | 3 | namespace EasyNetQ.DI 4 | { 5 | public static class InjectionExtensions 6 | { 7 | public static void RegisterAsEasyNetQContainerFactory(this IWindsorContainer container) 8 | { 9 | RabbitHutch.SetContainerFactory(() => new WindsorAdapter(container)); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Windsor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.DI.Windsor")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("456ad3ec-2759-4054-a31a-35ea086493e3")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.DI.Windsor/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.Setup/Debug/EasyNetQ.Hosepipe.Setup.msi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Source/EasyNetQ.Hosepipe.Setup/Debug/EasyNetQ.Hosepipe.Setup.msi -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.Setup/Debug/setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Source/EasyNetQ.Hosepipe.Setup/Debug/setup.exe -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.SetupActions/EasyNetQ.Hosepipe.SetupActions.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 93F795C9-FCA3-4B9F-B7EC-19759B8E44CE 10 | EasyNetQ.Hosepipe.SetupActions 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.Tests/Helper.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Hosepipe.Tests 2 | { 3 | public static class Helper 4 | { 5 | public static MessageReceivedInfo CreateMessageReceivedInfo() 6 | { 7 | return new MessageReceivedInfo( 8 | "consumer_tag", 9 | 0, 10 | false, 11 | "exchange_name", 12 | "routing_key", 13 | "queue_name" 14 | ); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/EasyNetQ.Hosepipe.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 99A7A83D-6F75-4A1C-83E8-7C4AF881B273 11 | EasyNetQ.Hosepipe 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/EasyNetQHosepipeException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public class EasyNetQHosepipeException : Exception 6 | { 7 | // 8 | // For guidelines regarding the creation of new exception types, see 9 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 10 | // and 11 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 12 | // 13 | 14 | public EasyNetQHosepipeException() {} 15 | public EasyNetQHosepipeException(string message) : base(message) {} 16 | public EasyNetQHosepipeException(string message, Exception inner) : base(message, inner) {} 17 | } 18 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/HosepipeConnection.cs: -------------------------------------------------------------------------------- 1 | using RabbitMQ.Client; 2 | using RabbitMQ.Client.Exceptions; 3 | 4 | namespace EasyNetQ.Hosepipe 5 | { 6 | public class HosepipeConnection 7 | { 8 | public static IConnection FromParameters(QueueParameters parameters) 9 | { 10 | var connectionFactory = new ConnectionFactory 11 | { 12 | HostName = parameters.HostName, 13 | VirtualHost = parameters.VHost, 14 | UserName = parameters.Username, 15 | Password = parameters.Password, 16 | Port = parameters.HostPort 17 | }; 18 | try 19 | { 20 | return connectionFactory.CreateConnection(); 21 | } 22 | catch (BrokerUnreachableException) 23 | { 24 | throw new EasyNetQHosepipeException(string.Format( 25 | "The broker at '{0}{2}' VirtualHost '{1}', is unreachable. This message can also be caused " + 26 | "by incorrect credentials.", 27 | parameters.HostName, 28 | parameters.VHost, 29 | parameters.HostPort == -1 ? string.Empty: ":" + parameters.HostPort)); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/HosepipeMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public class HosepipeMessage 6 | { 7 | public string Body { get; private set; } 8 | public MessageProperties Properties { get; private set; } 9 | public MessageReceivedInfo Info { get; private set; } 10 | 11 | public HosepipeMessage(string body, MessageProperties properties, MessageReceivedInfo info) 12 | { 13 | if(body == null) throw new ArgumentNullException("body"); 14 | if(properties == null) throw new ArgumentNullException("properties"); 15 | if(info == null) throw new ArgumentNullException("info"); 16 | 17 | Body = body; 18 | Properties = properties; 19 | Info = info; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/IErrorRetry.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public interface IErrorRetry 6 | { 7 | void RetryErrors(IEnumerable rawErrorMessages, QueueParameters parameters); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/IMessageReader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public interface IMessageReader 6 | { 7 | IEnumerable ReadMessages(QueueParameters parameters); 8 | IEnumerable ReadMessages(QueueParameters parameters, string messageName); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/IMessageWriter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public interface IMessageWriter 6 | { 7 | void Write(IEnumerable messages, QueueParameters parameters); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/IQueueInsertion.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EasyNetQ.Hosepipe 4 | { 5 | public interface IQueueInsertion { 6 | void PublishMessagesToQueue(IEnumerable messages, QueueParameters parameters); 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/QueueInsertion.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | using EasyNetQ.Consumer; 4 | 5 | using RabbitMQ.Client.Framing; 6 | 7 | namespace EasyNetQ.Hosepipe 8 | { 9 | public class QueueInsertion : IQueueInsertion 10 | { 11 | private readonly IErrorMessageSerializer errorMessageSerializer; 12 | 13 | public QueueInsertion(IErrorMessageSerializer errorMessageSerializer) 14 | { 15 | this.errorMessageSerializer = errorMessageSerializer; 16 | } 17 | 18 | public void PublishMessagesToQueue(IEnumerable messages, QueueParameters parameters) 19 | { 20 | using (var connection = HosepipeConnection.FromParameters(parameters)) 21 | using (var channel = connection.CreateModel()) 22 | { 23 | foreach (var message in messages) 24 | { 25 | var body = errorMessageSerializer.Deserialize(message.Body); 26 | 27 | var properties = new BasicProperties(); 28 | message.Properties.CopyTo(properties); 29 | 30 | channel.BasicPublish(message.Info.Exchange, message.Info.RoutingKey, true, properties, body); 31 | } 32 | } 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/QueueParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace EasyNetQ.Hosepipe 5 | { 6 | public class QueueParameters 7 | { 8 | public string HostName { get; set; } 9 | public int HostPort { get; set; } 10 | public string VHost { get; set; } 11 | public string Username { get; set; } 12 | public string Password { get; set; } 13 | public string QueueName { get; set; } 14 | public bool Purge { get; set; } 15 | public int NumberOfMessagesToRetrieve { get; set; } 16 | public string MessageFilePath { get; set; } 17 | 18 | public QueueParameters() 19 | { 20 | // set some defaults 21 | HostName = "localhost"; 22 | HostPort = -1; 23 | VHost = "/"; 24 | Username = "guest"; 25 | Password = "guest"; 26 | Purge = false; 27 | NumberOfMessagesToRetrieve = 1000; 28 | MessageFilePath = Directory.GetCurrentDirectory(); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Hosepipe/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Source/EasyNetQ.LogReader/EasyNetQ.LogReader.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | AA7F9D04-085B-4B71-8541-B838F5CAF9F2 10 | EasyNetQ.LogReader 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.LogReader/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.LogReader")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("EasyNetQ")] 11 | [assembly: AssemblyProduct("EasyNetQ.LogReader")] 12 | [assembly: AssemblyCopyright("Copyright © EasyNetQ 2011")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("959b928e-e0eb-4df6-b830-4dc1b0fe71f7")] 23 | 24 | 25 | [assembly: AssemblyVersion("2.0.4.0")] 26 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 27 | [assembly: AssemblyFileVersion("2.0.4.0")] 28 | -------------------------------------------------------------------------------- /Source/EasyNetQ.LogReader/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ.LogReader/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/EasyNetQ.Scheduler.Mongo.Core.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | F444E58F-DA2A-47E8-8246-C4BDD9A192B2 10 | EasyNetQ.Scheduler.Mongo.Core 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/IScheduleRepositoryConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Scheduler.Mongo.Core 4 | { 5 | public interface IScheduleRepositoryConfiguration 6 | { 7 | string ConnectionString { get; } 8 | string DatabaseName { get; } 9 | string CollectionName { get; } 10 | TimeSpan DeleteTimeout { get; } 11 | TimeSpan PublishTimeout { get; } 12 | } 13 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/ISchedulerService.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Scheduler.Mongo.Core 2 | { 3 | public interface ISchedulerService 4 | { 5 | void Start(); 6 | void Stop(); 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/ISchedulerServiceConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Scheduler.Mongo.Core 4 | { 5 | public interface ISchedulerServiceConfiguration 6 | { 7 | string SubscriptionId { get; } 8 | TimeSpan PublishInterval { get; } 9 | TimeSpan HandleTimeoutInterval { get; } 10 | int PublishMaxSchedules { get; } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/Schedule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MongoDB.Bson.Serialization.Attributes; 3 | 4 | namespace EasyNetQ.Scheduler.Mongo.Core 5 | { 6 | public class Schedule 7 | { 8 | public Guid Id { get; set; } 9 | 10 | public DateTime WakeTime { get; set; } 11 | 12 | [Obsolete] 13 | public string BindingKey { get; set; } 14 | 15 | [BsonIgnoreIfNull] 16 | public string CancellationKey { get; set; } 17 | 18 | public string Exchange { get; set; } 19 | 20 | public string ExchangeType { get; set; } 21 | 22 | public string RoutingKey { get; set; } 23 | 24 | public byte[] InnerMessage { get; set; } 25 | 26 | public MessageProperties BasicProperties { get; set; } 27 | 28 | public ScheduleState State { get; set; } 29 | 30 | [BsonIgnoreIfNull] 31 | public DateTime? PublishingTime { get; set; } 32 | 33 | [BsonIgnoreIfNull] 34 | public DateTime? PublishedTime { get; set; } 35 | } 36 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/ScheduleState.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Scheduler.Mongo.Core 2 | { 3 | public enum ScheduleState 4 | { 5 | Unknown = 0, 6 | Pending = 1, 7 | Publishing = 2, 8 | Published = 3 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Core/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Tests/MockScheduleRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.Scheduler.Mongo.Core; 3 | 4 | namespace EasyNetQ.Scheduler.Mongo.Tests 5 | { 6 | public class MockScheduleRepository : IScheduleRepository 7 | { 8 | public Func GetPendingDelegate { get; set; } 9 | 10 | public void Store(Schedule scheduleMe) 11 | { 12 | } 13 | 14 | public void Cancel(string cancelation) 15 | { 16 | } 17 | 18 | public Schedule GetPending() 19 | { 20 | return (GetPendingDelegate != null) 21 | ? GetPendingDelegate() 22 | : null; 23 | } 24 | 25 | public void MarkAsPublished(Guid id) 26 | { 27 | } 28 | 29 | public void HandleTimeout() 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/ConfigurationBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | 4 | namespace EasyNetQ.Scheduler.Mongo 5 | { 6 | public class ConfigurationBase 7 | { 8 | protected static int GetIntAppSetting(string settingKey) 9 | { 10 | var appSetting = ConfigurationManager.AppSettings[settingKey]; 11 | int value; 12 | if (!Int32.TryParse(appSetting, out value)) 13 | { 14 | throw new ApplicationException(String.Format("AppSetting '{0}' value '{1}' is not a valid integer", 15 | settingKey, appSetting)); 16 | } 17 | return value; 18 | } 19 | 20 | protected static TimeSpan GetTimeSpanAppSettings(string settingKey) 21 | { 22 | var appSetting = ConfigurationManager.AppSettings[settingKey]; 23 | TimeSpan value; 24 | if (!TimeSpan.TryParse(appSetting, out value)) 25 | { 26 | throw new ApplicationException(string.Format("AppSetting '{0}' value '{1}' is not a valid timespan", 27 | settingKey, appSetting)); 28 | } 29 | return value; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/EasyNetQ.Scheduler.Mongo.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | AFD272B4-4A2B-43D4-81ED-666F8918FD01 10 | EasyNetQ.Scheduler.Mongo 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/Logger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using log4net; 3 | 4 | namespace EasyNetQ.Scheduler.Mongo 5 | { 6 | public class Logger : IEasyNetQLogger 7 | { 8 | private readonly ILog log; 9 | 10 | public Logger(ILog log) 11 | { 12 | this.log = log; 13 | } 14 | 15 | public void DebugWrite(string format, params object[] args) 16 | { 17 | log.DebugFormat(format, args); 18 | } 19 | 20 | public void InfoWrite(string format, params object[] args) 21 | { 22 | log.InfoFormat(format, args); 23 | } 24 | 25 | public void ErrorWrite(string format, params object[] args) 26 | { 27 | log.ErrorFormat(format, args); 28 | } 29 | 30 | public void ErrorWrite(Exception exception) 31 | { 32 | log.ErrorFormat(exception.ToString()); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.Scheduler.Mongo")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("EasyNetQ.Scheduler.Mongo")] 12 | [assembly: AssemblyCopyright("Copyright © 2014")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("f5512d34-ac6e-415d-9cb8-16427f935b64")] 23 | 24 | [assembly: AssemblyVersion("2.0.4.0")] 25 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 26 | [assembly: AssemblyFileVersion("2.0.4.0")] 27 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/ScheduleRepositoryConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using EasyNetQ.Scheduler.Mongo.Core; 4 | 5 | namespace EasyNetQ.Scheduler.Mongo 6 | { 7 | public class ScheduleRepositoryConfiguration : ConfigurationBase, IScheduleRepositoryConfiguration 8 | { 9 | public string ConnectionString { get; set; } 10 | public string DatabaseName { get; set; } 11 | public string CollectionName { get; set; } 12 | public TimeSpan DeleteTimeout { get; set; } 13 | public TimeSpan PublishTimeout { get; set; } 14 | 15 | public static ScheduleRepositoryConfiguration FromConfigFile() 16 | { 17 | var connectionString = ConfigurationManager.ConnectionStrings["mongodb"]; 18 | return new ScheduleRepositoryConfiguration 19 | { 20 | ConnectionString = connectionString.ConnectionString, 21 | CollectionName = ConfigurationManager.AppSettings["collectionName"], 22 | DatabaseName = ConfigurationManager.AppSettings["databaseName"], 23 | DeleteTimeout = GetTimeSpanAppSettings("deleteTimeout"), 24 | PublishTimeout = GetTimeSpanAppSettings("publishTimeout") 25 | }; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/SchedulerServiceConfiguration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using EasyNetQ.Scheduler.Mongo.Core; 4 | 5 | namespace EasyNetQ.Scheduler.Mongo 6 | { 7 | public class SchedulerServiceConfiguration : ConfigurationBase, ISchedulerServiceConfiguration 8 | { 9 | public string SubscriptionId { get; set; } 10 | public TimeSpan PublishInterval { get; set; } 11 | public TimeSpan HandleTimeoutInterval { get; set; } 12 | public int PublishMaxSchedules { get; set; } 13 | 14 | public static SchedulerServiceConfiguration FromConfigFile() 15 | { 16 | return new SchedulerServiceConfiguration 17 | { 18 | SubscriptionId = ConfigurationManager.AppSettings["subscriptionId"], 19 | PublishInterval = GetTimeSpanAppSettings("publishInterval"), 20 | PublishMaxSchedules = GetIntAppSetting("publishMaxSchedules"), 21 | HandleTimeoutInterval = GetTimeSpanAppSettings("handleTimeoutInterval"), 22 | }; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/SchedulerServiceFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.Scheduler.Mongo.Core; 3 | using log4net; 4 | 5 | namespace EasyNetQ.Scheduler.Mongo 6 | { 7 | public static class SchedulerServiceFactory 8 | { 9 | public static ISchedulerService CreateScheduler() 10 | { 11 | var bus = RabbitHutch.CreateBus("host=localhost"); 12 | var logger = new Logger(LogManager.GetLogger("EasyNetQ.Scheduler")); 13 | 14 | return new SchedulerService( 15 | bus, 16 | logger, 17 | new ScheduleRepository(ScheduleRepositoryConfiguration.FromConfigFile(), () => DateTime.UtcNow), 18 | SchedulerServiceConfiguration.FromConfigFile()); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/log4net.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Mongo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Tests/MockScheduleRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using EasyNetQ.SystemMessages; 4 | 5 | namespace EasyNetQ.Scheduler.Tests 6 | { 7 | public class MockScheduleRepository : IScheduleRepository 8 | { 9 | public Func> GetPendingDelegate { get; set; } 10 | 11 | public void Store(ScheduleMe scheduleMe) 12 | { 13 | throw new NotImplementedException(); 14 | } 15 | 16 | public void Cancel(UnscheduleMe unscheduleMe) 17 | { 18 | throw new NotImplementedException(); 19 | } 20 | 21 | public IList GetPending() 22 | { 23 | return (GetPendingDelegate != null) 24 | ? GetPendingDelegate() 25 | : null; 26 | } 27 | 28 | public void Purge() 29 | { 30 | throw new NotImplementedException(); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/ConfigurationBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | 4 | namespace EasyNetQ.Scheduler 5 | { 6 | public class ConfigurationBase 7 | { 8 | public static short GetShortAppSetting(string settingKey) 9 | { 10 | var appSetting = ConfigurationManager.AppSettings[settingKey]; 11 | short value; 12 | if (!short.TryParse(appSetting, out value)) 13 | { 14 | throw new ApplicationException(string.Format("AppSetting '{0}' value '{1}' is not a valid short", 15 | settingKey, appSetting)); 16 | } 17 | return value; 18 | } 19 | 20 | public static int GetIntAppSetting(string settingKey) 21 | { 22 | var appSetting = ConfigurationManager.AppSettings[settingKey]; 23 | int value; 24 | if (!int.TryParse(appSetting, out value)) 25 | { 26 | throw new ApplicationException(string.Format("AppSetting '{0}' value '{1}' is not a valid integer", 27 | settingKey, appSetting)); 28 | } 29 | return value; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/EasyNetQ.Scheduler.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 03B93AAD-6CAB-4726-826E-B05684AEC1B9 10 | EasyNetQ.Scheduler 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.Scheduler")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("EasyNetQ")] 11 | [assembly: AssemblyProduct("EasyNetQ.Scheduler")] 12 | [assembly: AssemblyCopyright("Copyright © EasyNetQ 2011")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("7a1227cd-f5b8-4891-9518-ae4447d4ab88")] 23 | 24 | 25 | [assembly: AssemblyVersion("2.0.4.0")] 26 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 27 | [assembly: AssemblyFileVersion("2.0.4.0")] 28 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/SchedulerServiceConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Scheduler 2 | { 3 | public class SchedulerServiceConfiguration : ConfigurationBase 4 | { 5 | public int PublishIntervalSeconds { get; set; } 6 | public int PurgeIntervalSeconds { get; set; } 7 | 8 | public static SchedulerServiceConfiguration FromConfigFile() 9 | { 10 | return new SchedulerServiceConfiguration 11 | { 12 | PublishIntervalSeconds = GetIntAppSetting("PublishIntervalSeconds"), 13 | PurgeIntervalSeconds = GetIntAppSetting("PurgeIntervalSeconds") 14 | }; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/log4net.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Scheduler/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Serilog/EasyNetQ.Serilog.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 23a533be-64fb-47b2-b9d6-af48644162dd 11 | EasyNetQ.Serilog 12 | .\obj 13 | .\bin\ 14 | v4.6.1 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Serilog/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.Serilog")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("23a533be-64fb-47b2-b9d6-af48644162dd")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Serilog/SerilogLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Serilog; 3 | 4 | namespace EasyNetQ.Serilog 5 | { 6 | public class SerilogLogger : IEasyNetQLogger 7 | { 8 | private readonly ILogger logger; 9 | 10 | public SerilogLogger(ILogger logger) 11 | { 12 | this.logger = logger; 13 | } 14 | 15 | public void DebugWrite(string format, params object[] args) 16 | { 17 | logger.Debug(format, args); 18 | } 19 | 20 | public void InfoWrite(string format, params object[] args) 21 | { 22 | logger.Information(format, args); 23 | } 24 | 25 | public void ErrorWrite(string format, params object[] args) 26 | { 27 | logger.Error(format, args); 28 | } 29 | 30 | public void ErrorWrite(Exception exception) 31 | { 32 | logger.Error(exception, "Exception occured: {exception}", exception); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Serilog/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/EasyNetQ.Tests.Common.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 5d708fe2-f12b-4337-96bf-a9f79897a928 11 | EasyNetQ.Tests.Common 12 | .\obj 13 | .\bin\ 14 | v4.6.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("")] 10 | [assembly: AssemblyProduct("EasyNetQ.Tests.Common")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("5d708fe2-f12b-4337-96bf-a9f79897a928")] 20 | 21 | [assembly: AssemblyVersion("2.0.4.0")] 22 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 23 | [assembly: AssemblyFileVersion("2.0.4.0")] 24 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Traits/Category.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests 2 | { 3 | /// 4 | /// Possible test categories 5 | /// 6 | public enum Category 7 | { 8 | None, 9 | Integration, 10 | Explicit 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Traits/CategoryAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Xunit.Sdk; 3 | 4 | namespace EasyNetQ.Tests 5 | { 6 | /// 7 | /// Apply this attribute to your test method to specify a category. 8 | /// 9 | /// 10 | /// From xUnit sample about Trait extensibility: 11 | /// https://github.com/xunit/samples.xunit/blob/master/TraitExtensibility/CategoryAttribute.cs 12 | /// 13 | [TraitDiscoverer("EasyNetQ.Tests.CategoryDiscoverer", "EasyNetQ.Tests.Common")] 14 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] 15 | public class CategoryAttribute : Attribute, ITraitAttribute 16 | { 17 | public CategoryAttribute(Category category) 18 | { 19 | Category = category; 20 | } 21 | 22 | public Category Category { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Traits/CategoryDiscoverer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Xunit.Abstractions; 3 | using Xunit.Sdk; 4 | 5 | namespace EasyNetQ.Tests 6 | { 7 | /// 8 | /// Adapted from xUnit sample on Trait extensibility 9 | /// https://github.com/xunit/samples.xunit/blob/master/TraitExtensibility/CategoryDiscoverer.cs 10 | /// 11 | public class CategoryDiscoverer : ITraitDiscoverer 12 | { 13 | public IEnumerable> GetTraits(IAttributeInfo traitAttribute) 14 | { 15 | var namedArgs = traitAttribute.GetNamedArgument(nameof(CategoryAttribute.Category)); 16 | 17 | if (namedArgs == Category.None) 18 | { 19 | yield break; 20 | } 21 | else 22 | { 23 | yield return new KeyValuePair("Category", namedArgs.ToString()); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Traits/ExplicitAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests 2 | { 3 | /// 4 | /// Category specifiying that a test has to be explicitly named before it 5 | /// is run. 6 | /// 7 | public class ExplicitAttribute : CategoryAttribute 8 | { 9 | public ExplicitAttribute() 10 | : base(Category.Explicit) 11 | { } 12 | 13 | public ExplicitAttribute(string skipReason) 14 | : base(Category.Explicit) 15 | { 16 | SkipReason = skipReason; 17 | } 18 | 19 | public string SkipReason { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/Traits/IntegrationAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests 2 | { 3 | /// 4 | /// Category specifiying that the following test is an integration test. 5 | /// 6 | public class IntegrationAttribute : CategoryAttribute 7 | { 8 | public IntegrationAttribute() 9 | : base(Category.Integration) 10 | { } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.4-netcore1435", 3 | "description": "Common library for EasyNetQ.Tests", 4 | "title": "EasyNetQ.Tests.Common", 5 | "name": "EasyNetQ.Tests.Common", 6 | "buildOptions": { 7 | "compile": { 8 | "includeFiles": "..\\Version.cs" 9 | } 10 | }, 11 | "dependencies": { 12 | "NETStandard.Library": "1.6.0", 13 | "xunit": "2.2.0-beta2-build3300" 14 | }, 15 | 16 | "frameworks": { 17 | "netstandard1.5": { 18 | "imports": "dnxcore50", 19 | "buildOptions": { 20 | "define": [ 21 | "NET_STANDARD" 22 | ] 23 | } 24 | }, 25 | "net451": { 26 | "buildOptions": { 27 | "define": [ 28 | "NETFX" 29 | ] 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Performance.Consumer/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Performance.Producer/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.SimpleRequester/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/EasyNetQ.Tests.Tasks.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/EasyNetQ.Tests.Tasks.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | A5CF1B2C-E390-4BFF-BB1A-0F171DB0D6BD 10 | EasyNetQ.Tests.Tasks 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/NoDebugLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.Loggers; 3 | 4 | namespace EasyNetQ.Tests.Tasks 5 | { 6 | public class NoDebugLogger : IEasyNetQLogger 7 | { 8 | private readonly ConsoleLogger logger = new ConsoleLogger(); 9 | 10 | public void DebugWrite(string format, params object[] args) 11 | { 12 | 13 | } 14 | 15 | public void InfoWrite(string format, params object[] args) 16 | { 17 | logger.InfoWrite(format, args); 18 | } 19 | 20 | public void ErrorWrite(string format, params object[] args) 21 | { 22 | logger.ErrorWrite(format, args); 23 | } 24 | 25 | public void ErrorWrite(Exception exception) 26 | { 27 | logger.ErrorWrite(exception); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace EasyNetQ.Tests.Tasks 7 | { 8 | class Program 9 | { 10 | static int Main(string[] args) 11 | { 12 | using (var interactiveTaskRunner = new CommandLineTaskRunner()) 13 | { 14 | try 15 | { 16 | return interactiveTaskRunner.Run(); 17 | } 18 | catch (Exception e) 19 | { 20 | Console.WriteLine(e); 21 | Console.ReadLine(); 22 | return 1; 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/Tasks/SimpleRequester/ILatencyRecorder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Tests.SimpleRequester 4 | { 5 | public interface ILatencyRecorder : IDisposable 6 | { 7 | void RegisterRequest(long requestId); 8 | void RegisterResponse(long responseId); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests.Tasks/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/DefaultMessageConsumerTests.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using System; 4 | using EasyNetQ.AutoSubscribe; 5 | using Xunit; 6 | 7 | namespace EasyNetQ.Tests 8 | { 9 | public class DefaultMessageConsumerTests 10 | { 11 | [Fact] 12 | public void Should_create_consumer_instance_and_consume_message() 13 | { 14 | var consumer = new DefaultAutoSubscriberMessageDispatcher(); 15 | var message = new MyMessage(); 16 | var consumedMessage = (MyMessage) null; 17 | 18 | MyMessageConsumer.ConsumedMessageFunc = m => consumedMessage = m; 19 | consumer.Dispatch(message); 20 | 21 | Assert.Same(message, consumedMessage); 22 | } 23 | 24 | // Discovered by reflection over test assembly, do not remove. 25 | private class MyMessageConsumer : IConsume 26 | { 27 | public static Action ConsumedMessageFunc { get; set; } 28 | 29 | public void Consume(MyMessage message) 30 | { 31 | ConsumedMessageFunc(message); 32 | } 33 | } 34 | } 35 | } 36 | 37 | // ReSharper restore InconsistentNaming -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/EasyNetQ.Tests.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0.25420 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 62bbffce-4e84-42c8-86f5-0164acd12031 10 | EasyNetQ.Tests 11 | .\obj 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/FluentConfiguration/PublishConfigurationTests.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.FluentConfiguration; 3 | using Xunit; 4 | 5 | namespace EasyNetQ.Tests.FluentConfiguration 6 | { 7 | public class PublishConfigurationTests 8 | { 9 | [Fact] 10 | public void Should_throw_if_default_topic_is_null() 11 | { 12 | Assert.Throws(() => new PublishConfiguration(null)); 13 | } 14 | 15 | [Fact] 16 | public void Should_return_default_topic() 17 | { 18 | var configuration = new PublishConfiguration("default"); 19 | 20 | configuration.WithTopic(null); 21 | 22 | Assert.Equal(configuration.Topic, "default"); 23 | } 24 | 25 | [Fact] 26 | public void Should_return_custom_topic() 27 | { 28 | var configuration = new PublishConfiguration("default"); 29 | 30 | configuration.WithTopic("custom"); 31 | 32 | Assert.Equal(configuration.Topic, "custom"); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Integration/ConnectionErrorConditionsTests.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using System.Threading; 4 | using Xunit; 5 | 6 | namespace EasyNetQ.Tests.Integration 7 | { 8 | public class ConnectionErrorConditionsTests 9 | { 10 | [Fact][Explicit("Tries to make a connection to a RabbitMQ Broker")] 11 | public void Should_write_a_useful_error_message_when_connetion_fails() 12 | { 13 | RabbitHutch.CreateBus("host=localhost_not"); 14 | Thread.Sleep(2000); 15 | } 16 | 17 | [Fact][Explicit("Tries to make a connection to a RabbitMQ Broker")] 18 | public void Should_write_a_useful_error_message_when_VHost_does_not_exist() 19 | { 20 | RabbitHutch.CreateBus("host=localhost;virtualHost=not one I know"); 21 | Thread.Sleep(2000); 22 | } 23 | 24 | [Fact][Explicit("Tries to make a connection to a RabbitMQ Broker")] 25 | public void Should_write_a_useful_error_message_when_credentials_are_incorrect() 26 | { 27 | RabbitHutch.CreateBus("host=localhost;password=wrong_password"); 28 | Thread.Sleep(2000); 29 | } 30 | } 31 | } 32 | 33 | // ReSharper restore InconsistentNaming -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Integration/Helpers.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Management.Client; 2 | 3 | namespace EasyNetQ.Tests.Integration 4 | { 5 | public static class Helpers 6 | { 7 | public static IManagementClient GetClient() 8 | { 9 | return new ManagementClient("http://localhost", "guest", "guest", 15672); 10 | } 11 | 12 | public static void CloseConnection() 13 | { 14 | var client = GetClient(); 15 | foreach (var clientConnection in client.GetConnections()) 16 | { 17 | client.CloseConnection(clientConnection); 18 | } 19 | } 20 | 21 | public static void ClearAllQueues() 22 | { 23 | var client = GetClient(); 24 | foreach (var queue in client.GetQueues()) 25 | { 26 | client.Purge(queue); 27 | } 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Integration/LongRunningServer.js: -------------------------------------------------------------------------------- 1 | // LongRunningServer.js 2 | // This is a little node server that returns after an interval you define in the query string. 3 | // You'll need node.js for windows (http://nodejs.org) 4 | // Run like this: 5 | // node LongRunningServer.js 6 | // 7 | // Try it out with curl: 8 | // $ curl http://localhost:1338/?timeout=999 9 | // I waited for 999 milliseconds 10 | 11 | var http = require('http'); 12 | var url = require('url'); 13 | 14 | http.createServer(function (req, res) { 15 | var parsedUrl = url.parse(req.url, true); 16 | 17 | if (parsedUrl.pathname === '/') { 18 | var timeout = parseInt(parsedUrl.query['timeout']); 19 | timeout = isNaN(timeout) ? 0 : timeout; 20 | setTimeout(function () { 21 | res.writeHead(200, { 'Content-Type': 'text/plain' }); 22 | res.end('I waited for ' + timeout + ' milliseconds\n'); 23 | }, timeout); 24 | } else { 25 | res.writeHead(404, { 'Content-Type': 'text/plain' }); 26 | res.end('Not Found Here\n'); 27 | } 28 | 29 | }).listen(1338); 30 | 31 | console.log('LongRunningServer is at http://localhost:1338/'); -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Integration/NonGenericExtensionsIntegrationTests.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using System; 4 | using System.Threading; 5 | using Xunit; 6 | using EasyNetQ.NonGeneric; 7 | 8 | namespace EasyNetQ.Tests.Integration 9 | { 10 | [Explicit("Requires a RabbitMQ instance on localhost to work")] 11 | public class NonGenericExtensionsIntegrationTests : IDisposable 12 | { 13 | private IBus bus; 14 | 15 | public NonGenericExtensionsIntegrationTests() 16 | { 17 | bus = RabbitHutch.CreateBus("host=localhost"); 18 | } 19 | 20 | public void Dispose() 21 | { 22 | bus.Dispose(); 23 | } 24 | 25 | [Fact] 26 | public void Should_be_able_to_use_the_non_generic_subscribe_method() 27 | { 28 | var are = new AutoResetEvent(false); 29 | 30 | bus.Subscribe(typeof (MyMessage), "non_generic_test", x => 31 | { 32 | Console.Out.WriteLine("Got Message: {0}", ((MyMessage)x).Text); 33 | are.Set(); 34 | }); 35 | 36 | bus.Publish(new MyMessage{ Text = "Hi Mrs Non Generic :)"}); 37 | 38 | are.WaitOne(1000); 39 | } 40 | } 41 | } 42 | 43 | // ReSharper restore InconsistentNaming -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Integration/Scheduling/PartyInvitation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Tests.Integration.Scheduling 4 | { 5 | public class PartyInvitation 6 | { 7 | public string Text { get; set; } 8 | public DateTime Date { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Internals/AsyncSemaphoreTest.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Internals; 2 | using Xunit; 3 | 4 | namespace EasyNetQ.Tests.Internals 5 | { 6 | public class AsyncSemaphoreTest 7 | { 8 | [Fact] 9 | public void TestWaitRelease() 10 | { 11 | var semaphore = new AsyncSemaphore(1); 12 | Assert.Equal(1, semaphore.Available); 13 | semaphore.Wait(); 14 | Assert.Equal(0, semaphore.Available); 15 | semaphore.Release(); 16 | Assert.Equal(1, semaphore.Available); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/MessageVersioningTests/MyMessageV2.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.MessageVersioning; 2 | 3 | namespace EasyNetQ.Tests.MessageVersioningTests 4 | { 5 | public class MyMessageV2 : MyMessage, ISupersede 6 | { 7 | public int Number { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/MessageWithVeryVEryVEryLongNameThatWillMostCertainlyBreakAmqpsSilly255CharacterNameLimitThatIsAlmostCertainToBeReachedWithGenericTypes.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests.ProducerTests.Very.Long.Namespace.Certainly.Longer.Than.The255.Char.Length.That.RabbitMQ.Likes.That.Will.Certainly.Cause.An.AMQP.Exception.If.We.Dont.Do.Something.About.It.And.Stop.It.From.Happening 2 | { 3 | public class 4 | MessageWithVeryVEryVEryLongNameThatWillMostCertainlyBreakAmqpsSilly255CharacterNameLimitThatIsAlmostCertainToBeReachedWithGenericTypes 5 | { 6 | public string Text { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/MultipleExchangeTest/IMessageInterfaceOne.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests.MultipleExchangeTest 2 | { 3 | public interface IMessageInterfaceOne 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/MultipleExchangeTest/IMessageInterfaceTwo.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests.MultipleExchangeTest 2 | { 3 | public interface IMessageInterfaceTwo 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/MultipleExchangeTest/MessageWithTwoInterfaces.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests.MultipleExchangeTest 2 | { 3 | public class MessageWithTwoInterfaces : IMessageInterfaceOne, IMessageInterfaceTwo 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/PersistentConsumerTests/When_a_Persistent_consumer_is_created.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using Xunit; 4 | using NSubstitute; 5 | 6 | namespace EasyNetQ.Tests.PersistentConsumerTests 7 | { 8 | public class When_a_Persistent_consumer_starts_consuming : Given_a_PersistentConsumer 9 | { 10 | public override void AdditionalSetup() 11 | { 12 | persistentConnection.IsConnected.Returns(true); 13 | consumer.StartConsuming(); 14 | } 15 | 16 | [Fact] 17 | public void Should_create_internal_consumer() 18 | { 19 | internalConsumerFactory.Received().CreateConsumer(); 20 | createConsumerCalled.ShouldEqual(1); 21 | } 22 | 23 | [Fact] 24 | public void Should_ask_the_internal_consumer_to_start_consuming() 25 | { 26 | internalConsumers[0].Received().StartConsuming(persistentConnection, queue, onMessage, configuration); 27 | } 28 | } 29 | } 30 | 31 | // ReSharper restore InconsistentNaming -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/PersistentConsumerTests/When_disposed.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using Xunit; 4 | using NSubstitute; 5 | 6 | namespace EasyNetQ.Tests.PersistentConsumerTests 7 | { 8 | public class When_disposed : Given_a_PersistentConsumer 9 | { 10 | public override void AdditionalSetup() 11 | { 12 | persistentConnection.IsConnected.Returns(true); 13 | consumer.StartConsuming(); 14 | consumer.Dispose(); 15 | } 16 | 17 | [Fact] 18 | public void Should_dispose_the_internal_consumer() 19 | { 20 | internalConsumers[0].Received().Dispose(); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/PersistentConsumerTests/When_the_connection_is_broken.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using EasyNetQ.Events; 4 | using Xunit; 5 | using NSubstitute; 6 | 7 | namespace EasyNetQ.Tests.PersistentConsumerTests 8 | { 9 | public class When_the_connection_is_broken : Given_a_PersistentConsumer 10 | { 11 | public override void AdditionalSetup() 12 | { 13 | persistentConnection.IsConnected.Returns(true); 14 | consumer.StartConsuming(); 15 | eventBus.Publish(new ConnectionCreatedEvent()); 16 | } 17 | 18 | [Fact] 19 | public void Should_re_create_internal_consumer() 20 | { 21 | internalConsumerFactory.Received().CreateConsumer(); 22 | createConsumerCalled.ShouldEqual(2); 23 | internalConsumers.Count.ShouldEqual(2); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/ProducerTests/When_a_request_is_sent_but_no_reply_is_received.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using System; 4 | using EasyNetQ.Tests.Mocking; 5 | using Xunit; 6 | 7 | namespace EasyNetQ.Tests.ProducerTests 8 | { 9 | public class When_a_request_is_sent_but_no_reply_is_received : IDisposable 10 | { 11 | private MockBuilder mockBuilder; 12 | 13 | public When_a_request_is_sent_but_no_reply_is_received() 14 | { 15 | mockBuilder = new MockBuilder("host=localhost;timeout=1"); 16 | } 17 | 18 | public void Dispose() 19 | { 20 | mockBuilder.Bus.Dispose(); 21 | } 22 | 23 | [Fact] 24 | public void Should_throw_a_timeout_exception() 25 | { 26 | Assert.Throws(() => 27 | { 28 | try 29 | { 30 | mockBuilder.Bus.RequestAsync(new TestRequestMessage()).Wait(); 31 | } 32 | catch (AggregateException aggregateException) 33 | { 34 | throw aggregateException.InnerException; 35 | } 36 | }); 37 | } 38 | } 39 | } 40 | 41 | // ReSharper restore InconsistentNaming -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.Tests")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("EasyNetQ")] 11 | [assembly: AssemblyProduct("EasyNetQ.Tests")] 12 | [assembly: AssemblyCopyright("Copyright © EasyNetQ 2011")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("1dff2e31-d6a3-4744-b608-0607a3b08605")] 23 | 24 | 25 | [assembly: AssemblyVersion("2.0.4.0")] 26 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 27 | [assembly: AssemblyFileVersion("2.0.4.0")] 28 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/Scheduling/SchedulingExtensionsTests.cs: -------------------------------------------------------------------------------- 1 | // ReSharper disable InconsistentNaming 2 | 3 | using EasyNetQ.Scheduling; 4 | using EasyNetQ.Tests.Interception; 5 | using Xunit; 6 | using NSubstitute; 7 | 8 | namespace EasyNetQ.Tests.Scheduling 9 | { 10 | public class InterceptionExtensionsTests 11 | { 12 | [Fact] 13 | public void When_using_EnableDelayedExchangeScheduler_extension_method_required_services_are_registered() 14 | { 15 | var serviceRegister = Substitute.For(); 16 | serviceRegister.EnableDelayedExchangeScheduler(); 17 | serviceRegister.Received().Register(); 18 | } 19 | 20 | [Fact] 21 | public void When_using_EnableDeadLetterExchangeAndMessageTtlScheduler_extension_method_required_services_are_registered() 22 | { 23 | var serviceRegister = Substitute.For(); 24 | serviceRegister.EnableDeadLetterExchangeAndMessageTtlScheduler(); 25 | serviceRegister.Received().Register(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/StubCorrelationIdGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests 2 | { 3 | internal class StaticCorrelationIdGenerationStrategy : ICorrelationIdGenerationStrategy 4 | { 5 | private readonly string correlationId; 6 | 7 | public StaticCorrelationIdGenerationStrategy(string correlationId) 8 | { 9 | this.correlationId = correlationId; 10 | } 11 | public string GetCorrelationId() 12 | { 13 | return correlationId; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/TestMessage.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Tests 2 | { 3 | public class TestMessage 4 | { 5 | 6 | } 7 | 8 | [Queue("MyQueue", ExchangeName = "MyExchange")] 9 | public class AnnotatedTestMessage 10 | { 11 | } 12 | 13 | [Queue("MyQueue", ExchangeName = "MyExchange")] 14 | public interface IAnnotatedTestMessage 15 | { 16 | } 17 | 18 | 19 | [Queue("MyQueue")] 20 | public class QueueNameOnlyAnnotatedTestMessage 21 | { 22 | } 23 | 24 | [Queue("MyQueue")] 25 | public interface IQueueNameOnlyAnnotatedTestMessage 26 | { 27 | } 28 | 29 | [Queue("")] 30 | public class EmptyQueueNameAnnotatedTestMessage 31 | { 32 | } 33 | 34 | [Queue("")] 35 | public interface IEmptyQueueNameAnnotatedTestMessage 36 | { 37 | } 38 | 39 | 40 | public class MyMessage 41 | { 42 | public string Text { get; set; } 43 | } 44 | 45 | public class MyOtherMessage 46 | { 47 | public string Text { get; set; } 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/TimeoutStrategyTest.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | namespace EasyNetQ.Tests 4 | { 5 | [TimeoutSeconds(90)] 6 | public class MessageWithTimeoutAttribute 7 | { 8 | } 9 | 10 | 11 | public class MessageWithoutTimeoutAttribute 12 | { 13 | } 14 | 15 | public class TimeoutStrategyTest 16 | { 17 | [Fact] 18 | public void TestWhenMessagetWithAttribute() 19 | { 20 | var timeoutStrategy = new TimeoutStrategy(new ConnectionConfiguration {Timeout = 10}); 21 | Assert.Equal((ulong)90, timeoutStrategy.GetTimeoutSeconds(typeof(MessageWithTimeoutAttribute))); 22 | } 23 | 24 | [Fact] 25 | public void TestWhenPersistentMessagesIsFalse() 26 | { 27 | var timeoutStrategy = new TimeoutStrategy(new ConnectionConfiguration { Timeout = 10 }); 28 | Assert.Equal((ulong)10, timeoutStrategy.GetTimeoutSeconds(typeof(MessageWithoutTimeoutAttribute))); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.4-netcore1435", 3 | "description": "EasyNetQ.Tests", 4 | "title": "EasyNetQ.Tests", 5 | "name": "EasyNetQ.Tests", 6 | "buildOptions": { 7 | "compile": { 8 | "includeFiles": "..\\Version.cs" 9 | } 10 | }, 11 | "dependencies": { 12 | "dotnet-test-xunit": "2.2.0-preview2-build1029", 13 | "EasyNetQ": "2.0.4-netcore1435", 14 | "EasyNetQ.Management.Client": "2.0.0-netcore0001", 15 | "EasyNetQ.Tests.Common": "2.0.4-netcore1435", 16 | "Newtonsoft.Json": "10.0.2", 17 | "NSubstitute": "2.0.0-rc", 18 | "RabbitMQ.Client": "4.1.3", 19 | "xunit": "2.2.0-beta2-build3300", 20 | "xunit.runner.visualstudio": "2.2.0-beta2-build1149" 21 | }, 22 | 23 | "testRunner": "xunit", 24 | 25 | "frameworks": { 26 | "netcoreapp1.0": { 27 | "imports": "dnxcore50", 28 | "dependencies": { 29 | "Microsoft.NETCore.App": { 30 | "version": "1.0.1", 31 | "type": "platform" 32 | }, 33 | "System.Net.Http": "4.3.0" 34 | } 35 | }, 36 | "net451": { 37 | "frameworkAssemblies": { 38 | "System": "4.0.0.0", 39 | "System.Net.Http": "4.0.0.0" 40 | } 41 | } 42 | }, 43 | "runtimes": { 44 | "win7-x86": {}, 45 | "win7-x64": {} 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Trace/EasyNetQ.Trace.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 11DF08A9-3D14-44CC-A65E-5933121D3D63 10 | EasyNetQ.Trace 11 | .\obj 12 | .\bin\ 13 | v4.5 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Trace/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("EasyNetQ.Trace")] 8 | [assembly: AssemblyDescription("Subscribes to the trace exchange on RabbitMQ")] 9 | [assembly: AssemblyProduct("EasyNetQ.Trace")] 10 | [assembly: AssemblyCopyright("Copyright ©Mike Hadlow 2013")] 11 | 12 | // Setting ComVisible to false makes the types in this assembly not visible 13 | // to COM components. If you need to access a type in this assembly from 14 | // COM, set the ComVisible attribute to true on that type. 15 | [assembly: ComVisible(false)] 16 | 17 | 18 | [assembly: AssemblyVersion("2.0.4.0")] 19 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 20 | [assembly: AssemblyFileVersion("2.0.4.0")] 21 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Trace/Readme.md: -------------------------------------------------------------------------------- 1 | #EasyNetQ.Trace 2 | 3 | EasyNetQ trace is a simple console application for watching amq.rabbitmq.trace. 4 | 5 | See: 6 | 7 | [http://www.rabbitmq.com/firehose.html](http://www.rabbitmq.com/firehose.html) 8 | 9 | Simply start it with the [AMQP connection string](http://www.rabbitmq.com/uri-spec.html) to your broker. 10 | 11 | EasyNetQ.Trace.exe -a amqp://guest:guest@myhost/myVhost 12 | 13 | By default it will connect to the default vhost on your localhost as guest. 14 | 15 | It is also possible to export the messages to a csv file for later analysis. Command line options detailed as below: 16 | 17 | -a, --amqp-connection-string (Default: amqp://localhost/) AMQP Connection string. 18 | 19 | -q, --quiet (Default: False) Switch off verbose console output 20 | 21 | -o, --output-csv CSV File name for output 22 | 23 | --help Display help screen. -------------------------------------------------------------------------------- /Source/EasyNetQ.Trace/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/EasyNetQ.Trace/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | [AttributeUsage(AttributeTargets.Method)] 6 | public class AutoSubscriberConsumerAttribute : Attribute 7 | { 8 | public string SubscriptionId { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/AutoSubscriberConsumerInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | public class AutoSubscriberConsumerInfo 6 | { 7 | public readonly Type ConcreteType; 8 | public readonly Type InterfaceType; 9 | public readonly Type MessageType; 10 | 11 | public AutoSubscriberConsumerInfo(Type concreteType, Type interfaceType, Type messageType) 12 | { 13 | Preconditions.CheckNotNull(concreteType, "concreteType"); 14 | Preconditions.CheckNotNull(interfaceType, "interfaceType"); 15 | Preconditions.CheckNotNull(messageType, "messageType"); 16 | 17 | ConcreteType = concreteType; 18 | InterfaceType = interfaceType; 19 | MessageType = messageType; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/DefaultAutoSubscriberMessageDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | public class DefaultAutoSubscriberMessageDispatcher : IAutoSubscriberMessageDispatcher 6 | { 7 | public void Dispatch(TMessage message) 8 | where TMessage : class 9 | where TConsumer : IConsume 10 | { 11 | var consumer = (IConsume)ReflectionHelpers.CreateInstance(); 12 | 13 | consumer.Consume(message); 14 | } 15 | 16 | public Task DispatchAsync(TMessage message) 17 | where TMessage : class 18 | where TConsumer : IConsumeAsync 19 | { 20 | var consumer = (IConsumeAsync)ReflectionHelpers.CreateInstance(); 21 | 22 | return consumer.Consume(message); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/ForTopicAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 6 | public class ForTopicAttribute : Attribute 7 | { 8 | public ForTopicAttribute(string topic) 9 | { 10 | Topic = topic; 11 | } 12 | 13 | public string Topic { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/IAutoSubscriberMessageDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | public interface IAutoSubscriberMessageDispatcher 6 | { 7 | void Dispatch(TMessage message) 8 | where TMessage : class 9 | where TConsumer : IConsume; 10 | 11 | Task DispatchAsync(TMessage message) 12 | where TMessage : class 13 | where TConsumer : IConsumeAsync; 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/IConsume.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.AutoSubscribe 2 | { 3 | public interface IConsume where T : class 4 | { 5 | void Consume(T message); 6 | } 7 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/IConsumeAsync.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | public interface IConsumeAsync where T : class 6 | { 7 | Task Consume(T message); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/AutoSubscribe/SubscriptionConfigurationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.AutoSubscribe 4 | { 5 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)] 6 | public class SubscriptionConfigurationAttribute : Attribute 7 | { 8 | public bool AutoDelete { get; set; } 9 | public int Priority { get; set; } 10 | public bool CancelOnHaFailover { get; set; } 11 | public ushort PrefetchCount { get; set; } 12 | public int Expires { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/EasyNetQ/ConnectionString/IConnectionStringParser.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using Sprache; 3 | 4 | namespace EasyNetQ.ConnectionString 5 | { 6 | public interface IConnectionStringParser 7 | { 8 | ConnectionConfiguration Parse(string connectionString); 9 | } 10 | 11 | public class ConnectionStringParser : IConnectionStringParser 12 | { 13 | public ConnectionConfiguration Parse(string connectionString) 14 | { 15 | try 16 | { 17 | var updater = ConnectionStringGrammar.ConnectionStringBuilder.Parse(connectionString); 18 | var connectionConfiguration = updater.Aggregate(new ConnectionConfiguration(), (current, updateFunction) => updateFunction(current)); 19 | connectionConfiguration.Validate(); 20 | return connectionConfiguration; 21 | } 22 | catch (ParseException parseException) 23 | { 24 | throw new EasyNetQException("Connection String {0}", parseException.Message); 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/AckStrategies.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Events; 2 | using RabbitMQ.Client; 3 | 4 | namespace EasyNetQ.Consumer 5 | { 6 | public delegate AckResult AckStrategy(IModel model, ulong deliveryTag); 7 | 8 | public static class AckStrategies 9 | { 10 | public static AckStrategy Ack = (model, tag) => { model.BasicAck(tag, false); return AckResult.Ack; }; 11 | public static AckStrategy NackWithoutRequeue = (model, tag) => { model.BasicNack(tag, false, false); return AckResult.Nack; }; 12 | public static AckStrategy NackWithRequeue = (model, tag) => { model.BasicNack(tag, false, true); return AckResult.Nack; }; 13 | public static AckStrategy Nothing = (model, tag) => AckResult.Nothing; 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/Base64ErrorMessageSerializer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public class Base64ErrorMessageSerializer : IErrorMessageSerializer 6 | { 7 | public string Serialize(byte[] messageBody) 8 | { 9 | return Convert.ToBase64String(messageBody); 10 | } 11 | 12 | public byte[] Deserialize(string messageBody) 13 | { 14 | return Convert.FromBase64String(messageBody); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/ConsumerCancellation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public class ConsumerCancellation : IDisposable 6 | { 7 | private readonly Action onCancellation; 8 | 9 | public ConsumerCancellation(Action onCancellation) 10 | { 11 | Preconditions.CheckNotNull(onCancellation, "onCancellation"); 12 | 13 | this.onCancellation = onCancellation; 14 | } 15 | 16 | public void Dispose() 17 | { 18 | onCancellation(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/DefaultErrorMessageSerializer.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public class DefaultErrorMessageSerializer : IErrorMessageSerializer 6 | { 7 | public string Serialize(byte[] messageBody) 8 | { 9 | return Encoding.UTF8.GetString(messageBody); 10 | } 11 | 12 | public byte[] Deserialize(string messageBody) 13 | { 14 | return Encoding.UTF8.GetBytes(messageBody); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/HandlerCollectionFactory.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Topology; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public class HandlerCollectionFactory : IHandlerCollectionFactory 6 | { 7 | private readonly IEasyNetQLogger logger; 8 | 9 | public HandlerCollectionFactory(IEasyNetQLogger logger) 10 | { 11 | this.logger = logger; 12 | } 13 | 14 | public IHandlerCollection CreateHandlerCollection(IQueue queue) 15 | { 16 | return new HandlerCollection(logger); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/HandlerCollectionPerQueueFactory.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections.Concurrent; 3 | using EasyNetQ.Topology; 4 | 5 | namespace EasyNetQ.Consumer 6 | { 7 | public class HandlerCollectionPerQueueFactory : IHandlerCollectionFactory 8 | { 9 | readonly ConcurrentDictionary handlerCollections = new ConcurrentDictionary(); 10 | readonly IEasyNetQLogger logger; 11 | 12 | public HandlerCollectionPerQueueFactory(IEasyNetQLogger logger) 13 | { 14 | this.logger = logger; 15 | } 16 | 17 | public IHandlerCollection CreateHandlerCollection(IQueue queue) 18 | { 19 | return handlerCollections.AddOrUpdate(queue.Name, 20 | queueName => new HandlerCollection(logger), 21 | (queueName, existingCollection) => existingCollection); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IConsumer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public interface IConsumer : IDisposable 6 | { 7 | IDisposable StartConsuming(); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IConsumerDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public interface IConsumerDispatcher : IDisposable 6 | { 7 | void QueueAction(Action action); 8 | void OnDisconnected(); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IConsumerDispatcherFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public interface IConsumerDispatcherFactory : IDisposable 6 | { 7 | IConsumerDispatcher GetConsumerDispatcher(); 8 | void OnDisconnected(); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IConsumerErrorStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public interface IConsumerErrorStrategy : IDisposable 6 | { 7 | /// 8 | /// This method is fired when an exception is thrown. Implement a strategy for 9 | /// handling the exception here. 10 | /// 11 | /// The consumer execution context. 12 | /// The exception 13 | /// for processing the original failed message 14 | AckStrategy HandleConsumerError(ConsumerExecutionContext context, Exception exception); 15 | 16 | /// 17 | /// This method is fired when the task returned from the UserHandler is cancelled. 18 | /// Implement a strategy for handling the cancellation here. 19 | /// 20 | /// The consumer execution context. 21 | /// for processing the original cancelled message 22 | AckStrategy HandleConsumerCancelled(ConsumerExecutionContext context); 23 | } 24 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IConsumerFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Threading.Tasks; 4 | using EasyNetQ.Topology; 5 | 6 | namespace EasyNetQ.Consumer 7 | { 8 | public interface IConsumerFactory : IDisposable 9 | { 10 | IConsumer CreateConsumer( 11 | ICollection>> queueConsumerPairs, 12 | IPersistentConnection connection, 13 | IConsumerConfiguration configuration); 14 | 15 | IConsumer CreateConsumer( 16 | IQueue queue, 17 | Func onMessage, 18 | IPersistentConnection connection, 19 | IConsumerConfiguration configuration 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IErrorMessageSerializer.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Consumer 2 | { 3 | public interface IErrorMessageSerializer 4 | { 5 | string Serialize(byte[] messageBody); 6 | 7 | byte[] Deserialize(string messageBody); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IHandlerCollectionFactory.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Topology; 2 | 3 | namespace EasyNetQ.Consumer 4 | { 5 | public interface IHandlerCollectionFactory 6 | { 7 | IHandlerCollection CreateHandlerCollection(IQueue queue); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/IReceiveRegistration.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace EasyNetQ.Consumer 5 | { 6 | public interface IReceiveRegistration 7 | { 8 | /// 9 | /// Add an asychronous message handler to this receiver 10 | /// 11 | /// The type of message to receive 12 | /// The message handler 13 | /// 'this' for fluent configuration 14 | IReceiveRegistration Add(Func onMessage) where T : class; 15 | 16 | /// 17 | /// Add a message handler to this receiver 18 | /// 19 | /// The type of message to receive 20 | /// The message handler 21 | /// 'this' for fluent configuration 22 | IReceiveRegistration Add(Action onMessage) where T : class; 23 | } 24 | 25 | 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Consumer/StartConsumingStatus.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Consumer 2 | { 3 | public enum StartConsumingStatus 4 | { 5 | Succeed, 6 | Failed, 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/DefaultCorrelationIdGenerationStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | public class DefaultCorrelationIdGenerationStrategy : ICorrelationIdGenerationStrategy 6 | { 7 | public string GetCorrelationId() 8 | { 9 | return Guid.NewGuid().ToString(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/DeliveryModeAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] 6 | public class DeliveryModeAttribute : Attribute 7 | { 8 | public DeliveryModeAttribute(bool isPersistent) 9 | { 10 | IsPersistent = isPersistent; 11 | } 12 | 13 | public bool IsPersistent { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/EasyNetQ.xproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | ed270a39-d32c-438a-bf4f-aa0e66c7879c 10 | EasyNetQ 11 | ..\artifacts\obj\$(MSBuildProjectName) 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/AckEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class AckEvent 4 | { 5 | public MessageReceivedInfo ReceivedInfo { get; private set; } 6 | public MessageProperties Properties { get; private set; } 7 | public byte[] Body { get; private set; } 8 | public AckResult AckResult { get; private set; } 9 | 10 | public AckEvent(MessageReceivedInfo info, MessageProperties properties, byte[] body , AckResult ackResult) 11 | { 12 | ReceivedInfo = info; 13 | Properties = properties; 14 | Body = body; 15 | AckResult = ackResult; 16 | } 17 | } 18 | 19 | public enum AckResult 20 | { 21 | Ack, 22 | Nack, 23 | Exception, 24 | Nothing 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ConnectionBlockedEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ConnectionBlockedEvent 4 | { 5 | public string Reason { get; private set; } 6 | 7 | public ConnectionBlockedEvent(string reason) 8 | { 9 | Reason = reason; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ConnectionCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ConnectionCreatedEvent 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ConnectionDisconnectedEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ConnectionDisconnectedEvent 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ConnectionUnblockedEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ConnectionUnblockedEvent 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ConsumerModelDisposedEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ConsumerModelDisposedEvent 4 | { 5 | public string ConsumerTag { get; private set; } 6 | 7 | public ConsumerModelDisposedEvent(string consumerTag) 8 | { 9 | ConsumerTag = consumerTag; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/DeliveredMessageEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class DeliveredMessageEvent 4 | { 5 | public MessageReceivedInfo ReceivedInfo { get; private set; } 6 | public MessageProperties Properties { get; private set; } 7 | public byte[] Body { get; private set; } 8 | 9 | public DeliveredMessageEvent(MessageReceivedInfo info, MessageProperties properties, byte[] body) 10 | { 11 | ReceivedInfo = info; 12 | Properties = properties; 13 | Body = body; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/MessageConfirmationEvent.cs: -------------------------------------------------------------------------------- 1 | using RabbitMQ.Client; 2 | 3 | namespace EasyNetQ.Events 4 | { 5 | public class MessageConfirmationEvent 6 | { 7 | public IModel Channel { get; private set; } 8 | public ulong DeliveryTag { get; private set; } 9 | public bool Multiple { get; private set; } 10 | public bool IsNack { get; private set; } 11 | 12 | public static MessageConfirmationEvent Ack(IModel channel, ulong deliveryTag, bool multiple) 13 | { 14 | return new MessageConfirmationEvent 15 | { 16 | Channel = channel, 17 | IsNack = false, 18 | DeliveryTag = deliveryTag, 19 | Multiple = multiple 20 | }; 21 | } 22 | 23 | public static MessageConfirmationEvent Nack(IModel channel, ulong deliveryTag, bool multiple) 24 | { 25 | return new MessageConfirmationEvent 26 | { 27 | Channel = channel, 28 | IsNack = true, 29 | DeliveryTag = deliveryTag, 30 | Multiple = multiple 31 | }; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/PublishChannelCreatedEvent.cs: -------------------------------------------------------------------------------- 1 | using RabbitMQ.Client; 2 | 3 | namespace EasyNetQ.Events 4 | { 5 | public class PublishChannelCreatedEvent 6 | { 7 | public IModel Channel { get; private set; } 8 | 9 | public PublishChannelCreatedEvent(IModel channel) 10 | { 11 | Channel = channel; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/PublishedMessageEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class PublishedMessageEvent 4 | { 5 | public string ExchangeName { get; private set; } 6 | public string RoutingKey { get; private set; } 7 | public MessageProperties Properties { get; private set; } 8 | public byte[] Body { get; private set; } 9 | 10 | public PublishedMessageEvent(string exchangeName, string routingKey, MessageProperties properties, byte[] body) 11 | { 12 | ExchangeName = exchangeName; 13 | RoutingKey = routingKey; 14 | Properties = properties; 15 | Body = body; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/ReturnedMessageEvent.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Events 2 | { 3 | public class ReturnedMessageEvent 4 | { 5 | public byte[] Body { get; private set; } 6 | public MessageProperties Properties { get; private set; } 7 | public MessageReturnedInfo Info { get; private set; } 8 | 9 | public ReturnedMessageEvent(byte[] body, MessageProperties properties, MessageReturnedInfo info) 10 | { 11 | Body = body; 12 | Properties = properties; 13 | Info = info; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/StartConsumingFailedEvent.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Consumer; 2 | using EasyNetQ.Topology; 3 | 4 | namespace EasyNetQ.Events 5 | { 6 | /// 7 | /// This event is fired when the consumer cannot start consuming successfully. 8 | /// 9 | public class StartConsumingFailedEvent 10 | { 11 | public IConsumer Consumer { get; private set; } 12 | 13 | public IQueue Queue { get; private set; } 14 | 15 | public StartConsumingFailedEvent(IConsumer consumer, IQueue queue) 16 | { 17 | Consumer = consumer; 18 | Queue = queue; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/StartConsumingSucceededEvent.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Consumer; 2 | using EasyNetQ.Topology; 3 | 4 | namespace EasyNetQ.Events 5 | { 6 | /// 7 | /// This event is fired when the consumer starts consuming successfully. 8 | /// 9 | public class StartConsumingSucceededEvent 10 | { 11 | public IConsumer Consumer { get; private set; } 12 | 13 | public IQueue Queue { get; private set; } 14 | 15 | public StartConsumingSucceededEvent(IConsumer consumer, IQueue queue) 16 | { 17 | Consumer = consumer; 18 | Queue = queue; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Events/StoppedConsumingEvent.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Consumer; 2 | 3 | namespace EasyNetQ.Events 4 | { 5 | /// 6 | /// This event is fired when the logical consumer stops consuming. 7 | /// 8 | /// This is _not_ fired when a connection interruption causes EasyNetQ to re-create 9 | /// a PersistentConsumer. 10 | /// 11 | public class StoppedConsumingEvent 12 | { 13 | public IConsumer Consumer { get; private set; } 14 | 15 | public StoppedConsumingEvent(IConsumer consumer) 16 | { 17 | Consumer = consumer; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Concurrent; 3 | using System.Collections.Generic; 4 | using System.Diagnostics; 5 | 6 | namespace EasyNetQ 7 | { 8 | public static class Extensions 9 | { 10 | public static void SafeDispose(this IDisposable disposable) 11 | { 12 | try 13 | { 14 | disposable.Dispose(); 15 | } 16 | catch(Exception exception) 17 | { 18 | Trace.TraceError(exception.ToString()); 19 | } 20 | } 21 | 22 | public static TimeSpan Double(this TimeSpan timeSpan) 23 | { 24 | return timeSpan + timeSpan; 25 | } 26 | 27 | public static void Remove(this ConcurrentDictionary source, TKey key) 28 | { 29 | ((IDictionary) source).Remove(key); 30 | } 31 | 32 | public static void Add(this ConcurrentDictionary source, TKey key, TValue value) 33 | { 34 | ((IDictionary)source).Add(key, value); 35 | } 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/IClusterHostSelectionStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | /// 4 | /// Provides a strategy for selecting a host from a list of nodes in a cluster 5 | /// 6 | /// 7 | public interface IClusterHostSelectionStrategy 8 | { 9 | /// 10 | /// Add a cluster node 11 | /// 12 | /// 13 | void Add(T item); 14 | 15 | /// 16 | /// Get the currently selected node 17 | /// 18 | /// 19 | T Current(); 20 | 21 | /// 22 | /// Move to the next node 23 | /// 24 | /// 25 | bool Next(); 26 | 27 | /// 28 | /// Mark the current node as successfully connected 29 | /// 30 | void Success(); 31 | 32 | /// 33 | /// Did the current node successfully connect? 34 | /// 35 | bool Succeeded { get; } 36 | 37 | /// 38 | /// The current node has disconnected and we want to run the strategy again 39 | /// 40 | void Reset(); 41 | } 42 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/ICorrelationIdGenerationStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public interface ICorrelationIdGenerationStrategy 4 | { 5 | string GetCorrelationId(); 6 | } 7 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/IEasyNetQLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | public interface IEasyNetQLogger 6 | { 7 | void DebugWrite(string format, params object[] args); 8 | void InfoWrite(string format, params object[] args); 9 | void ErrorWrite(string format, params object[] args); 10 | void ErrorWrite(Exception exception); 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/IMessageSerializationStrategy.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace EasyNetQ 3 | { 4 | public interface IMessageSerializationStrategy 5 | { 6 | SerializedMessage SerializeMessage(IMessage message); 7 | IMessage DeserializeMessage(MessageProperties properties, byte[] body) where T : class; 8 | IMessage DeserializeMessage(MessageProperties properties, byte[] body); 9 | } 10 | 11 | public class SerializedMessage 12 | { 13 | public SerializedMessage(MessageProperties properties, byte[] body) 14 | { 15 | Properties = properties; 16 | Body = body; 17 | } 18 | 19 | public MessageProperties Properties { get; private set; } 20 | public byte[] Body { get; private set; } 21 | } 22 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/IPersistentConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public interface IPersistentConnectionFactory 4 | { 5 | IPersistentConnection CreateConnection(); 6 | } 7 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/ISerializer.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public interface ISerializer 4 | { 5 | byte[] MessageToBytes(T message) where T : class; 6 | T BytesToMessage(byte[] bytes); 7 | object BytesToMessage(string typeName, byte[] bytes); 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/ISubscriptionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.Consumer; 3 | using EasyNetQ.Topology; 4 | 5 | namespace EasyNetQ 6 | { 7 | /// 8 | /// The result of an Subscribe or SubscribeAsync operation. 9 | /// In order to cancel the subscription, call dispose on this object or on ConsumerCancellation. 10 | /// 11 | public interface ISubscriptionResult : IDisposable 12 | { 13 | /// 14 | /// The to which is bound. 15 | /// 16 | IExchange Exchange { get; } 17 | /// 18 | /// The that the underlying is consuming. 19 | /// 20 | IQueue Queue { get; } 21 | /// 22 | /// The cancellation, which can be disposed to cancel the subscription. 23 | /// 24 | IDisposable ConsumerCancellation { get; } 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/ITimeoutStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | public interface ITimeoutStrategy 6 | { 7 | ulong GetTimeoutSeconds(Type messageType); 8 | } 9 | 10 | public class TimeoutStrategy : ITimeoutStrategy 11 | { 12 | private readonly ConnectionConfiguration connectionConfiguration; 13 | 14 | public TimeoutStrategy(ConnectionConfiguration connectionConfiguration) 15 | { 16 | Preconditions.CheckNotNull(connectionConfiguration, "connectionConfiguration"); 17 | this.connectionConfiguration = connectionConfiguration; 18 | } 19 | 20 | public ulong GetTimeoutSeconds(Type messageType) 21 | { 22 | Preconditions.CheckNotNull(messageType, "messageType"); 23 | var timeoutAttribute = messageType.GetAttribute(); 24 | return timeoutAttribute != null ? timeoutAttribute.Timeout : connectionConfiguration.Timeout; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/CompositeInterceptor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace EasyNetQ.Interception 5 | { 6 | public class CompositeInterceptor : IProduceConsumeInterceptor 7 | { 8 | private readonly List interceptors = new List(); 9 | 10 | public RawMessage OnProduce(RawMessage rawMessage) 11 | { 12 | return interceptors.AsEnumerable() 13 | .Aggregate(rawMessage, (x, y) => y.OnProduce(x)); 14 | } 15 | 16 | public RawMessage OnConsume(RawMessage rawMessage) 17 | { 18 | return interceptors.AsEnumerable() 19 | .Reverse() 20 | .Aggregate(rawMessage, (x, y) => y.OnConsume(x)); 21 | } 22 | 23 | public void Add(IProduceConsumeInterceptor interceptor) 24 | { 25 | interceptors.Add(interceptor); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/DefaultInterceptor.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Interception 2 | { 3 | public class DefaultInterceptor : IProduceConsumeInterceptor 4 | { 5 | public RawMessage OnProduce(RawMessage rawMessage) 6 | { 7 | return rawMessage; 8 | } 9 | 10 | public RawMessage OnConsume(RawMessage rawMessage) 11 | { 12 | return rawMessage; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/IProduceConsumeInterceptor.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Interception 2 | { 3 | public interface IProduceConsumeInterceptor 4 | { 5 | RawMessage OnProduce(RawMessage rawMessage); 6 | RawMessage OnConsume(RawMessage rawMessage); 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/InterceptionExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Interception 4 | { 5 | public static class InterceptionExtensions 6 | { 7 | public static IServiceRegister EnableInterception(this IServiceRegister serviceRegister, Action configure) 8 | { 9 | var registrator = new InterceptorRegistrator(serviceRegister); 10 | configure(registrator); 11 | return registrator.Register(); 12 | } 13 | 14 | public static IInterceptorRegistrator EnableGZipCompression(this IInterceptorRegistrator interceptorRegistrator) 15 | { 16 | interceptorRegistrator.Add(new GZipInterceptor()); 17 | return interceptorRegistrator; 18 | } 19 | 20 | public static IInterceptorRegistrator EnableTripleDESEncryption(this IInterceptorRegistrator interceptorRegistrator, byte[] key, byte[] iv) 21 | { 22 | interceptorRegistrator.Add(new TripleDESInterceptor(key, iv)); 23 | return interceptorRegistrator; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/InterceptorRegistrator.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Interception 2 | { 3 | public interface IInterceptorRegistrator 4 | { 5 | void Add(IProduceConsumeInterceptor interceptor); 6 | } 7 | 8 | public class InterceptorRegistrator : IInterceptorRegistrator 9 | { 10 | private readonly CompositeInterceptor compositeInterceptor; 11 | private readonly IServiceRegister serviceRegister; 12 | 13 | public InterceptorRegistrator(IServiceRegister serviceRegister) 14 | { 15 | this.serviceRegister = serviceRegister; 16 | compositeInterceptor = new CompositeInterceptor(); 17 | } 18 | 19 | public IServiceRegister Register() 20 | { 21 | serviceRegister.Register(_ => compositeInterceptor); 22 | return serviceRegister; 23 | } 24 | 25 | public void Add(IProduceConsumeInterceptor interceptor) 26 | { 27 | compositeInterceptor.Add(interceptor); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Interception/RawMessage.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Interception 2 | { 3 | public class RawMessage 4 | { 5 | public RawMessage(MessageProperties properties, byte[] body) 6 | { 7 | Properties = properties; 8 | Body = body; 9 | } 10 | 11 | public MessageProperties Properties { get; private set; } 12 | public byte[] Body { get; private set; } 13 | } 14 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Internals/AsyncSemaphore.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | 4 | namespace EasyNetQ.Internals 5 | { 6 | /// 7 | /// AsyncSemaphore should be used with a lot of care. 8 | /// 9 | public class AsyncSemaphore 10 | { 11 | private readonly SemaphoreSlim semaphore; 12 | 13 | public AsyncSemaphore(int initial) 14 | { 15 | semaphore = new SemaphoreSlim(initial); 16 | } 17 | 18 | public int Available => semaphore.CurrentCount; 19 | 20 | public void Wait() 21 | { 22 | semaphore.Wait(); 23 | } 24 | 25 | public Task WaitAsync() 26 | { 27 | return semaphore.WaitAsync(); 28 | } 29 | 30 | public void Release() 31 | { 32 | semaphore.Release(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Loggers/NullLogger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Loggers 4 | { 5 | /// 6 | /// noop logger 7 | /// 8 | public class NullLogger : IEasyNetQLogger 9 | { 10 | public void DebugWrite(string format, params object[] args) 11 | { 12 | 13 | } 14 | 15 | public void InfoWrite(string format, params object[] args) 16 | { 17 | 18 | } 19 | 20 | public void ErrorWrite(string format, params object[] args) 21 | { 22 | 23 | } 24 | 25 | public void ErrorWrite(Exception exception) 26 | { 27 | 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageDeliveryMode.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public static class MessageDeliveryMode 4 | { 5 | public const byte NonPersistent = 1; 6 | public const byte Persistent = 2; 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageReceivedInfo.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public class MessageReceivedInfo 4 | { 5 | public string ConsumerTag { get; set; } 6 | public ulong DeliverTag { get; set; } 7 | public bool Redelivered { get; set; } 8 | public string Exchange { get; set; } 9 | public string RoutingKey { get; set; } 10 | public string Queue { get; set; } 11 | 12 | public MessageReceivedInfo() {} 13 | 14 | public MessageReceivedInfo( 15 | string consumerTag, 16 | ulong deliverTag, 17 | bool redelivered, 18 | string exchange, 19 | string routingKey, 20 | string queue) 21 | { 22 | Preconditions.CheckNotNull(consumerTag, "consumerTag"); 23 | Preconditions.CheckNotNull(exchange, "exchange"); 24 | Preconditions.CheckNotNull(routingKey, "routingKey"); 25 | Preconditions.CheckNotNull(queue, "queue"); 26 | 27 | ConsumerTag = consumerTag; 28 | DeliverTag = deliverTag; 29 | Redelivered = redelivered; 30 | Exchange = exchange; 31 | RoutingKey = routingKey; 32 | Queue = queue; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageReturnedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | public class MessageReturnedEventArgs : EventArgs 6 | { 7 | public byte[] MessageBody { get; private set; } 8 | public MessageProperties MessageProperties { get; private set; } 9 | public MessageReturnedInfo MessageReturnedInfo { get; private set; } 10 | 11 | public MessageReturnedEventArgs(byte[] messageBody, MessageProperties messageProperties, MessageReturnedInfo messageReturnedInfo) 12 | { 13 | Preconditions.CheckNotNull(messageBody, "messageBody"); 14 | Preconditions.CheckNotNull(messageProperties, "messageProperties"); 15 | Preconditions.CheckNotNull(messageReturnedInfo, "messageReturnedInfo"); 16 | 17 | MessageBody = messageBody; 18 | MessageProperties = messageProperties; 19 | MessageReturnedInfo = messageReturnedInfo; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageReturnedInfo.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ 2 | { 3 | public class MessageReturnedInfo 4 | { 5 | public string Exchange { get; set; } 6 | public string RoutingKey { get; set; } 7 | public string ReturnReason { get; set; } 8 | 9 | public MessageReturnedInfo( 10 | string exchange, 11 | string routingKey, 12 | string returnReason) 13 | { 14 | Preconditions.CheckNotNull(exchange, "exchange"); 15 | Preconditions.CheckNotNull(routingKey, "routingKey"); 16 | Preconditions.CheckNotNull(returnReason, "returnReason"); 17 | 18 | Exchange = exchange; 19 | RoutingKey = routingKey; 20 | ReturnReason = returnReason; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageVersioning/ISupersede.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.MessageVersioning 2 | { 3 | /// 4 | /// Marker interface to indicate that a message supersedes a previous version. 5 | /// 6 | /// 7 | /// Requires that and are 8 | /// registered in the to take advantage of message version support. 9 | /// 10 | /// The tpye of the message being superseded. 11 | /// 12 | /// In the following code, MessageV2 extends and supersedes MessageV1. When MessageV2 is published, it will also be routed to 13 | /// any MessageV1 subscribers. 14 | /// 15 | /// 22 | /// { 23 | /// public DateTime SomeOtherProperty { get; set; } 24 | /// } 25 | /// ]]> 26 | /// 27 | /// 28 | public interface ISupersede where T : class {} 29 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageVersioning/MessageType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.MessageVersioning 4 | { 5 | public class MessageType 6 | { 7 | public string TypeString { get; set; } 8 | public Type Type { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MessageVersioning/MessageVersioningExtensions.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Producer; 2 | 3 | namespace EasyNetQ.MessageVersioning 4 | { 5 | public static class MessageVersioningExtensions 6 | { 7 | public static IServiceRegister EnableMessageVersioning( this IServiceRegister serviceRegister ) 8 | { 9 | return serviceRegister 10 | .Register() 11 | .Register(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/MultipleExchange/MultipleExchangeExtension.cs: -------------------------------------------------------------------------------- 1 | using EasyNetQ.Producer; 2 | 3 | namespace EasyNetQ.MultipleExchange 4 | { 5 | public static class MultipleExchangeExtension 6 | { 7 | public static IServiceRegister EnableAdvancedMessagePolymorphism(this IServiceRegister serviceRegister) 8 | { 9 | return serviceRegister 10 | .Register(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Source/EasyNetQ/PersistentConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace EasyNetQ 6 | { 7 | public class PersistentConnectionFactory : IPersistentConnectionFactory 8 | { 9 | private readonly IEventBus eventBus; 10 | private readonly IConnectionFactory connectionFactory; 11 | private readonly IEasyNetQLogger logger; 12 | 13 | public PersistentConnectionFactory(IEasyNetQLogger logger, IConnectionFactory connectionFactory, IEventBus eventBus) 14 | { 15 | this.logger = logger; 16 | this.connectionFactory = connectionFactory; 17 | this.eventBus = eventBus; 18 | } 19 | 20 | public IPersistentConnection CreateConnection() 21 | { 22 | return new PersistentConnection(connectionFactory, logger, eventBus); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IClientCommandDispatcher.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using RabbitMQ.Client; 4 | 5 | namespace EasyNetQ.Producer 6 | { 7 | /// 8 | /// Responsible for invoking client commands. 9 | /// 10 | public interface IClientCommandDispatcher : IDisposable 11 | { 12 | T Invoke(Func channelAction); 13 | void Invoke(Action channelAction); 14 | Task InvokeAsync(Func channelAction); 15 | Task InvokeAsync(Action channelAction); 16 | } 17 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IClientCommandDispatcherFactory.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Producer 2 | { 3 | public interface IClientCommandDispatcherFactory 4 | { 5 | IClientCommandDispatcher GetClientCommandDispatcher(IPersistentConnection connection); 6 | } 7 | 8 | public class ClientCommandDispatcherFactory : IClientCommandDispatcherFactory 9 | { 10 | private readonly ConnectionConfiguration configuration; 11 | private readonly IPersistentChannelFactory persistentChannelFactory; 12 | 13 | public ClientCommandDispatcherFactory(ConnectionConfiguration configuration, IPersistentChannelFactory persistentChannelFactory) 14 | { 15 | Preconditions.CheckNotNull(configuration, "configuration"); 16 | Preconditions.CheckNotNull(persistentChannelFactory, "persistentChannelFactory"); 17 | this.configuration = configuration; 18 | this.persistentChannelFactory = persistentChannelFactory; 19 | } 20 | 21 | public IClientCommandDispatcher GetClientCommandDispatcher(IPersistentConnection connection) 22 | { 23 | Preconditions.CheckNotNull(connection, "connection"); 24 | return new ClientCommandDispatcher(configuration, connection, persistentChannelFactory); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IPersistentChannel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using RabbitMQ.Client; 3 | 4 | namespace EasyNetQ.Producer 5 | { 6 | public interface IPersistentChannel : IDisposable 7 | { 8 | void InvokeChannelAction(Action channelAction); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IPersistentChannelFactory.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Producer 2 | { 3 | public interface IPersistentChannelFactory 4 | { 5 | IPersistentChannel CreatePersistentChannel(IPersistentConnection connection); 6 | } 7 | 8 | public class PersistentChannelFactory : IPersistentChannelFactory 9 | { 10 | private readonly IEasyNetQLogger logger; 11 | private readonly ConnectionConfiguration configuration; 12 | private readonly IEventBus eventBus; 13 | 14 | public PersistentChannelFactory(IEasyNetQLogger logger, ConnectionConfiguration configuration, IEventBus eventBus) 15 | { 16 | Preconditions.CheckNotNull(logger, "logger"); 17 | Preconditions.CheckNotNull(configuration, "configuration"); 18 | Preconditions.CheckNotNull(eventBus, "eventBus"); 19 | 20 | this.logger = logger; 21 | this.configuration = configuration; 22 | this.eventBus = eventBus; 23 | } 24 | 25 | public IPersistentChannel CreatePersistentChannel(IPersistentConnection connection) 26 | { 27 | Preconditions.CheckNotNull(connection, "connection"); 28 | 29 | return new PersistentChannel(connection, logger, configuration, eventBus); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IPublishConfirmationListener.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using RabbitMQ.Client; 3 | 4 | namespace EasyNetQ.Producer 5 | { 6 | public interface IPublishConfirmationListener : IDisposable 7 | { 8 | IPublishConfirmationWaiter GetWaiter(IModel model); 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IPublishConfirmationWaiter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace EasyNetQ.Producer 5 | { 6 | public interface IPublishConfirmationWaiter 7 | { 8 | void Wait(TimeSpan timeout); 9 | Task WaitAsync(TimeSpan timeout); 10 | void Cancel(); 11 | } 12 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IPublishExchangeDeclareStrategy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using EasyNetQ.Topology; 4 | 5 | namespace EasyNetQ.Producer 6 | { 7 | public interface IPublishExchangeDeclareStrategy 8 | { 9 | IExchange DeclareExchange(IAdvancedBus advancedBus, string exchangeName, string exchangeType); 10 | IExchange DeclareExchange(IAdvancedBus advancedBus, Type messageType, string exchangeType); 11 | Task DeclareExchangeAsync(IAdvancedBus advancedBus, string exchangeName, string exchangeType); 12 | Task DeclareExchangeAsync(IAdvancedBus advancedBus, Type messageType, string exchangeType); 13 | } 14 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/IResponderConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Producer 2 | { 3 | public interface IResponderConfiguration 4 | { 5 | IResponderConfiguration WithPrefetchCount(ushort prefetchCount); 6 | } 7 | 8 | public class ResponderConfiguration : IResponderConfiguration 9 | { 10 | public ResponderConfiguration(ushort defaultPrefetchCount) 11 | { 12 | PrefetchCount = defaultPrefetchCount; 13 | } 14 | 15 | public ushort PrefetchCount { get; private set; } 16 | 17 | public IResponderConfiguration WithPrefetchCount(ushort prefetchCount) 18 | { 19 | PrefetchCount = prefetchCount; 20 | return this; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/PublishInterruptedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Producer 4 | { 5 | public class PublishInterruptedException : Exception 6 | { 7 | // 8 | // For guidelines regarding the creation of new exception types, see 9 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 10 | // and 11 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 12 | // 13 | 14 | public PublishInterruptedException() 15 | { 16 | } 17 | 18 | public PublishInterruptedException(string message) 19 | : base(message) 20 | { 21 | } 22 | 23 | public PublishInterruptedException(string message, Exception inner) 24 | : base(message, inner) 25 | { 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Producer/PublishNackedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.Producer 4 | { 5 | public class PublishNackedException : Exception 6 | { 7 | // 8 | // For guidelines regarding the creation of new exception types, see 9 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp 10 | // and 11 | // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp 12 | // 13 | 14 | public PublishNackedException() 15 | { 16 | } 17 | 18 | public PublishNackedException(string message) : base(message) 19 | { 20 | } 21 | 22 | public PublishNackedException(string message, Exception inner) : base(message, inner) 23 | { 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("EasyNetQ")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("EasyNetQ")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ed270a39-d32c-438a-bf4f-aa0e66c7879c")] 24 | [assembly: AssemblyVersion("2.0.4.0")] 25 | [assembly: AssemblyInformationalVersion("2.0.4-netcore.1435+Branch.feature/netcore.Sha.a997be04162dfa34c99681e265733c91c0d564f3")] 26 | [assembly: AssemblyFileVersion("2.0.4.0")] 27 | -------------------------------------------------------------------------------- /Source/EasyNetQ/QueueAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple=false)] 6 | public class QueueAttribute : Attribute 7 | { 8 | public QueueAttribute(string queueName) 9 | { 10 | QueueName = queueName ?? string.Empty; 11 | } 12 | 13 | public string QueueName { get; private set; } 14 | public string ExchangeName { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Scheduling/SchedulingExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Scheduling 2 | { 3 | public static class SchedulingExtensions 4 | { 5 | public static IServiceRegister EnableDelayedExchangeScheduler(this IServiceRegister serviceRegister) 6 | { 7 | return serviceRegister.Register(); 8 | } 9 | 10 | public static IServiceRegister EnableDeadLetterExchangeAndMessageTtlScheduler(this IServiceRegister serviceRegister) 11 | { 12 | return serviceRegister.Register(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/Failure.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Sprache 6 | { 7 | sealed class Failure : IFailure 8 | { 9 | readonly Func _message; 10 | readonly Func> _expectations; 11 | readonly Input _input; 12 | 13 | public Failure(Input input, Func message, Func> expectations) 14 | { 15 | _input = input; 16 | _message = message; 17 | _expectations = expectations; 18 | } 19 | 20 | public string Message => _message(); 21 | 22 | public IEnumerable Expectations => _expectations(); 23 | 24 | public Input FailedInput => _input; 25 | 26 | public override string ToString() 27 | { 28 | var expMsg = ""; 29 | 30 | if (Expectations.Any()) 31 | expMsg = " expected " + Expectations.Aggregate((e1, e2) => e1 + " or " + e2); 32 | 33 | return string.Format("Parsing failure: {0};{1} ({2}).", Message, expMsg, FailedInput); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/IFailure.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Sprache 4 | { 5 | public interface IFailure : IResult 6 | { 7 | string Message { get; } 8 | IEnumerable Expectations { get; } 9 | Input FailedInput { get; } 10 | } 11 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/IResultOfT.cs: -------------------------------------------------------------------------------- 1 | namespace Sprache 2 | { 3 | public interface IResult 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/ISuccess.cs: -------------------------------------------------------------------------------- 1 | namespace Sprache 2 | { 3 | public interface ISuccess : IResult 4 | { 5 | T Result { get; } 6 | Input Remainder { get; } 7 | } 8 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/ParseException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sprache 4 | { 5 | public class ParseException : Exception 6 | { 7 | public ParseException(string message) 8 | : base(message) 9 | { 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/ResultHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sprache 4 | { 5 | static class ResultHelper 6 | { 7 | public static IResult IfSuccess(this IResult result, Func, IResult> next) 8 | { 9 | var s = result as ISuccess; 10 | if (s != null) 11 | return next(s); 12 | 13 | var f = (IFailure)result; 14 | return new Failure(f.FailedInput, () => f.Message, () => f.Expectations); 15 | } 16 | 17 | public static IResult IfFailure(this IResult result, Func, IResult> next) 18 | { 19 | var s = result as ISuccess; 20 | if (s != null) 21 | return s; 22 | var f = (IFailure)result; 23 | return next(f); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Sprache/Success.cs: -------------------------------------------------------------------------------- 1 | namespace Sprache 2 | { 3 | sealed class Success : ISuccess 4 | { 5 | readonly Input _remainder; 6 | readonly T _result; 7 | 8 | public Success(T result, Input remainder) 9 | { 10 | _result = result; 11 | _remainder = remainder; 12 | } 13 | 14 | public T Result => _result; 15 | 16 | public Input Remainder => _remainder; 17 | 18 | public override string ToString() 19 | { 20 | return string.Format("Successful parsing of {0}.", Result); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/SubscriptionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EasyNetQ.Topology; 3 | 4 | namespace EasyNetQ.Consumer 5 | { 6 | public class SubscriptionResult : ISubscriptionResult 7 | { 8 | public IExchange Exchange { get; } 9 | public IQueue Queue { get; } 10 | public IDisposable ConsumerCancellation { get; } 11 | 12 | public SubscriptionResult(IExchange exchange, IQueue queue, IDisposable consumerCancellation) 13 | { 14 | Preconditions.CheckNotNull(exchange, "exchange"); 15 | Preconditions.CheckNotNull(queue, "queue"); 16 | Preconditions.CheckNotNull(consumerCancellation, "consumerCancellation"); 17 | 18 | Exchange = exchange; 19 | Queue = queue; 20 | ConsumerCancellation = consumerCancellation; 21 | } 22 | 23 | public void Dispose() 24 | { 25 | ConsumerCancellation?.Dispose(); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/SystemMessages/Error.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.SystemMessages 4 | { 5 | /// 6 | /// A wrapper for errored messages 7 | /// 8 | public class Error 9 | { 10 | public string RoutingKey { get; set; } 11 | public string Exchange { get; set; } 12 | public string Queue { get; set; } 13 | public string Exception { get; set; } 14 | public string Message { get; set; } 15 | public DateTime DateTime { get; set; } 16 | public MessageProperties BasicProperties { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/SystemMessages/ScheduleMe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.SystemMessages 4 | { 5 | public class ScheduleMe 6 | { 7 | public DateTime WakeTime { get; set; } 8 | public string CancellationKey { get; set; } 9 | public string Exchange { get; set; } 10 | public string ExchangeType { get; set; } 11 | public string RoutingKey { get; set; } 12 | public byte[] InnerMessage { get; set; } 13 | public MessageProperties MessageProperties { get; set; } 14 | 15 | [Obsolete] 16 | public string BindingKey { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/SystemMessages/UnscheduleMe.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ.SystemMessages 4 | { 5 | public class UnscheduleMe 6 | { 7 | public string CancellationKey { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/TimeBudget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | 4 | namespace EasyNetQ 5 | { 6 | public sealed class TimeBudget 7 | { 8 | public TimeBudget(TimeSpan budget, TimeSpan precision) 9 | { 10 | this.budget = budget; 11 | this.precision = precision; 12 | watch = new Stopwatch(); 13 | } 14 | 15 | public TimeBudget(TimeSpan budget) 16 | : this(budget, TimeSpan.FromMilliseconds(5)) { } 17 | 18 | public TimeBudget Start() 19 | { 20 | watch.Start(); 21 | return this; 22 | } 23 | 24 | public TimeSpan GetRemainingTime() 25 | { 26 | var remaining = budget - watch.Elapsed; 27 | return remaining < precision 28 | ? TimeSpan.Zero 29 | : remaining; 30 | } 31 | 32 | public bool IsExpired() 33 | { 34 | var remaining = budget - watch.Elapsed; 35 | return remaining < precision; 36 | } 37 | 38 | private readonly TimeSpan budget; 39 | private readonly TimeSpan precision; 40 | private readonly Stopwatch watch; 41 | } 42 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/TimeoutSecondsAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace EasyNetQ 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)] 6 | public class TimeoutSecondsAttribute : Attribute 7 | { 8 | public ushort Timeout { get; private set; } 9 | 10 | public TimeoutSecondsAttribute(ushort timeout) 11 | { 12 | Timeout = timeout; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/Binding.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public class Binding : IBinding 4 | { 5 | public Binding(IBindable bindable, IExchange exchange, string routingKey) 6 | { 7 | Preconditions.CheckNotNull(bindable, "bindable"); 8 | Preconditions.CheckNotNull(exchange, "exchange"); 9 | Preconditions.CheckNotNull(routingKey, "routingKey"); 10 | 11 | Bindable = bindable; 12 | Exchange = exchange; 13 | RoutingKey = routingKey; 14 | } 15 | 16 | public IBindable Bindable { get; private set; } 17 | public IExchange Exchange { get; private set; } 18 | public string RoutingKey { get; private set; } 19 | } 20 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/Exchange.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public class Exchange : IExchange 4 | { 5 | private static readonly Exchange defaultExchange = new Exchange(""); 6 | 7 | public string Name { get; private set; } 8 | 9 | public static IExchange GetDefault() 10 | { 11 | return defaultExchange; 12 | } 13 | 14 | public Exchange(string name) 15 | { 16 | Preconditions.CheckNotNull(name, "name"); 17 | Name = name; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/ExchangeType.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public static class ExchangeType 4 | { 5 | public const string Direct = "direct"; 6 | public const string Topic = "topic"; 7 | public const string Fanout = "fanout"; 8 | public const string Header = "headers"; 9 | } 10 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/IBindable.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public interface IBindable 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/IBinding.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public interface IBinding 4 | { 5 | IBindable Bindable { get; } 6 | IExchange Exchange { get; } 7 | string RoutingKey { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/IExchange.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public interface IExchange : IBindable 4 | { 5 | string Name { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/IQueue.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | /// 4 | /// Represents an AMQP queue 5 | /// 6 | public interface IQueue : IBindable 7 | { 8 | /// 9 | /// The name of the queue 10 | /// 11 | string Name { get; } 12 | 13 | /// 14 | /// Is this queue transient? 15 | /// 16 | bool IsExclusive { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /Source/EasyNetQ/Topology/Queue.cs: -------------------------------------------------------------------------------- 1 | namespace EasyNetQ.Topology 2 | { 3 | public class Queue : IQueue 4 | { 5 | public Queue(string name, bool isExclusive) 6 | { 7 | Preconditions.CheckNotBlank(name, "name"); 8 | Name = name; 9 | IsExclusive = isExclusive; 10 | } 11 | 12 | public string Name { get; private set; } 13 | public bool IsExclusive { get; private set; } 14 | } 15 | } -------------------------------------------------------------------------------- /Source/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Source/build-core.bat: -------------------------------------------------------------------------------- 1 | dotnet restore 2 | gitversion /output buildserver /updateassemblyinfo 3 | set basePath=%~dp0 4 | set outputPath=..\..\artifacts 5 | 6 | cd %basePath%EasyNetQ 7 | dotnet gitversion 8 | dotnet pack -c Release -o %outputPath% 9 | 10 | cd %basePath%EasyNetQ.DI.Autofac 11 | dotnet gitversion 12 | dotnet pack -c Release -o %outputPath% 13 | 14 | cd %basePath%EasyNetQ.DI.LightInject 15 | dotnet gitversion 16 | dotnet pack -c Release -o %outputPath% 17 | 18 | cd %basePath%EasyNetQ.DI.Ninject 19 | dotnet gitversion 20 | dotnet pack -c Release -o %outputPath% 21 | 22 | cd %basePath%EasyNetQ.DI.SimpleInjector 23 | dotnet gitversion 24 | dotnet pack -c Release -o %outputPath% 25 | 26 | cd %basePath%EasyNetQ.DI.StructureMap 27 | dotnet gitversion 28 | dotnet pack -c Release -o %outputPath% 29 | 30 | cd %basePath%EasyNetQ.DI.Windsor 31 | dotnet gitversion 32 | dotnet pack -c Release -o %outputPath% 33 | 34 | cd %basePath%EasyNetQ.Serilog 35 | dotnet gitversion 36 | dotnet pack -c Release -o %outputPath% 37 | -------------------------------------------------------------------------------- /Tools/ILRepack/ILRepack.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/ILRepack/ILRepack.exe -------------------------------------------------------------------------------- /Tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.dll -------------------------------------------------------------------------------- /Tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/MSBuildCommunityTasks/MSBuild.Community.Tasks.pdb -------------------------------------------------------------------------------- /Tools/NUnit/2.5/TestDriven.Framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/TestDriven.Framework.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/addins.txt: -------------------------------------------------------------------------------- 1 | ================ 2 | NUnit Extensions 3 | ================ 4 | 5 | To install NUnit extensions, create a new 'addins' directory here: 6 | \Program Files (x86)\TestDriven.NET 3\NUnit\2.5\addins 7 | 8 | To ensure that your extensions are always available, the following 9 | directory can be xcopy deployed along with your solution: 10 | \Program Files (x86)\TestDriven.NET 3\NUnit\2.5 11 | 12 | You can read more about xcopy deployable test runners here: 13 | http://www.paraesthesia.com/archive/2010/05/03/how-to-run-a-different-nunit-version-with-testdriven.net.aspx 14 | http://weblogs.asp.net/nunitaddin/archive/2009/11/05/testdriven-net-2-24-xcopy-deployable-test-runners.aspx 15 | 16 | Example extensions can be found in the NUnit source distribution: 17 | src\samples\Extensibility\Core\CoreExtensibility.sln 18 | 19 | For more information you can contact: 20 | Jamie Cansdale 21 | 22 | or the 'nunit-developer' mailing list: 23 | http://sourceforge.net/mail?group_id=10749 24 | -------------------------------------------------------------------------------- /Tools/NUnit/2.5/framework/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/framework/nunit.framework.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/framework/nunit.framework.dll.tdnet: -------------------------------------------------------------------------------- 1 | 2 | NUnit {0}.{1}.{2} 3 | ..\nunit.tdnet.dll 4 | NUnit.AddInRunner.NUnitTestRunner 5 | Reference 6 | MTA 7 | 8 | NUnit 9 | ..\nunit.exe 10 | ..\nunit-x86.exe 11 | -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit-console-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit-console-runner.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit-gui-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit-gui-runner.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit.core.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit.core.interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit.core.interfaces.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit.uiexception.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit.uiexception.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit.uikit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit.uikit.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/lib/nunit.util.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/lib/nunit.util.dll -------------------------------------------------------------------------------- /Tools/NUnit/2.5/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/license.txt -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit-agent-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit-agent-x86.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit-agent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit-agent.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit-console-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit-console-x86.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit-console.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit-x86.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit.exe -------------------------------------------------------------------------------- /Tools/NUnit/2.5/nunit.tdnet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NUnit/2.5/nunit.tdnet.dll -------------------------------------------------------------------------------- /Tools/NuGet/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikehadlow/EasyNetQ/ed42ffff03d40ef800654ac4bf1099e6aa8a3a4a/Tools/NuGet/NuGet.exe -------------------------------------------------------------------------------- /appveyor.gitversion.yml: -------------------------------------------------------------------------------- 1 | install: 2 | - choco install gitversion.portable -pre -y 3 | 4 | assembly_info: 5 | patch: false 6 | 7 | before_build: 8 | - nuget restore 9 | - ps: gitversion /l console /output buildserver /updateAssemblyInfo 10 | 11 | build: 12 | project: 13 | 14 | after_build: 15 | - cmd: ECHO nuget pack \.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" 16 | - cmd: nuget pack \.nuspec -version "%GitVersion_NuGetVersion%" -prop "target=%CONFIGURATION%" 17 | - cmd: appveyor PushArtifact ".%GitVersion_NuGetVersion%.nupkg" -------------------------------------------------------------------------------- /build.bat: -------------------------------------------------------------------------------- 1 | "C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe" "build\EasyNetQ.proj" 2 | 3 | pause -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "Source" ], 3 | "sdk": { 4 | "version": "1.0.0-preview2-003121" 5 | } 6 | } -------------------------------------------------------------------------------- /licence.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2015 Mike Hadlow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. --------------------------------------------------------------------------------