├── help
├── fti
│ ├── FTI_121.json
│ ├── FTI_122.json
│ ├── FTI_106.json
│ ├── FTI_107.json
│ ├── FTI_119.json
│ ├── FTI_120.json
│ └── FTI_113.json
├── Item.gif
├── Index.gif
├── Search.gif
├── SyncTOC.gif
├── favicon.ico
├── Collapsed.gif
├── ExpandAll.bmp
├── Expanded.gif
├── Splitter.gif
├── icons
│ ├── CFW.gif
│ ├── adm.gif
│ ├── box.gif
│ ├── dev.gif
│ ├── exp.gif
│ ├── kw.gif
│ ├── xna.gif
│ ├── arch.gif
│ ├── big_kw.gif
│ ├── drpup.gif
│ ├── expall.gif
│ ├── footer.gif
│ ├── kw_adm.gif
│ ├── kw_dev.gif
│ ├── load.gif
│ ├── note.gif
│ ├── pencil.GIF
│ ├── save.gif
│ ├── static.gif
│ ├── Caution.gif
│ ├── adm_arch.gif
│ ├── adm_dev.gif
│ ├── big_adm.gif
│ ├── big_arch.gif
│ ├── big_dev.gif
│ ├── collall.gif
│ ├── collapse.gif
│ ├── copycode.gif
│ ├── dev_arch.gif
│ ├── dropdown.gif
│ ├── drpdown.gif
│ ├── filter1a.gif
│ ├── filter1c.gif
│ ├── gradient.gif
│ ├── greychck.gif
│ ├── kw_arch.gif
│ ├── privenum.gif
│ ├── protenum.gif
│ ├── pubclass.gif
│ ├── pubenum.gif
│ ├── pubevent.gif
│ ├── pubfield.gif
│ ├── security.gif
│ ├── slMobile.gif
│ ├── CopyCode_h.gif
│ ├── LastChild.gif
│ ├── alert_note.gif
│ ├── expand_all.gif
│ ├── greencheck.gif
│ ├── kw_adm_arch.gif
│ ├── kw_adm_dev.gif
│ ├── kw_dev_arch.gif
│ ├── load_hover.gif
│ ├── privclass.gif
│ ├── privevent.gif
│ ├── privfield.gif
│ ├── privmethod.gif
│ ├── protclass.gif
│ ├── protevent.gif
│ ├── protfield.gif
│ ├── protmethod.gif
│ ├── pubdelegate.gif
│ ├── pubmethod.gif
│ ├── puboperator.gif
│ ├── pubproperty.gif
│ ├── save_hover.gif
│ ├── seealso1a.gif
│ ├── seealso1c.gif
│ ├── adm_dev_arch.gif
│ ├── alert_caution.gif
│ ├── collapse_all.gif
│ ├── dropdownHover.gif
│ ├── privdelegate.gif
│ ├── privextension.gif
│ ├── privinterface.gif
│ ├── privproperty.gif
│ ├── privstructure.gif
│ ├── protdelegate.gif
│ ├── protextension.gif
│ ├── protinterface.gif
│ ├── protoperator.gif
│ ├── protproperty.gif
│ ├── protstructure.gif
│ ├── pubextension.gif
│ ├── pubinterface.gif
│ ├── pubstructure.gif
│ ├── alert_security.gif
│ ├── drpdown_orange.gif
│ ├── header_prev_next.jpg
│ ├── kw_adm_dev_arch.gif
│ ├── privenumeration.gif
│ ├── protenumeration.gif
│ ├── pubenumeration.gif
│ ├── requirements1a.gif
│ ├── requirements1c.gif
│ ├── copycodeHighlight.gif
│ ├── drpdown_orange_up.gif
│ ├── header_sql_tutorial_blank.jpg
│ └── header_sql_tutorial_logo.GIF
├── CloseSearch.png
├── CollapseAll.bmp
├── images
│ ├── LT_tab.gif
│ ├── RT_tab.gif
│ ├── alert_note.gif
│ ├── lt_search.gif
│ ├── msg-icon.gif
│ ├── rt_search.gif
│ ├── searchicon.gif
│ ├── msg-incoming.gif
│ ├── msg-outgoing.gif
│ ├── slice_search.gif
│ ├── lightweight_topnav.png
│ ├── lightweight_topnav_slice.gif
│ ├── msdn2010branding-stripe.png
│ ├── msdn2010branding-stripe1.png
│ └── 030c41d9079671d09a62d8e2c1db6973.gif
├── styles
│ ├── msdn10
│ │ ├── bg.png
│ │ ├── clear.gif
│ │ ├── bullet.gif
│ │ ├── internav.png
│ │ ├── bg_vstudio.png
│ │ ├── contentpane.png
│ │ ├── contentpaneleft.png
│ │ ├── subnav_vstudio.png
│ │ ├── adart_repository.png
│ │ ├── contentpaneright.png
│ │ └── Msdn10_vstudio-bn20091118.css
│ └── lw-miranda.css
├── scripts
│ ├── EventUtilities.js
│ └── SplitScreen.js
├── Web.Config
├── FillNode.php
└── SearchHelp.php
├── LICENCE.txt
├── docs
├── overview.txt
├── brigher_canon.jpg
└── Figures
│ ├── hexagonal_unittest.vsd
│ ├── Command Sequence Diagram.vsd
│ └── hexagonal_architecture.vsd
├── lib
├── Hawk.2.0.0-beta5.nupkg
└── Hawk.2.0.0-beta5.symbols.nupkg
├── tests
└── Paramore.Brighter.Tests
│ ├── AssemblyInfo.cs
│ ├── Logging
│ └── TestDoubles
│ │ ├── MyLoggedHandler.cs
│ │ ├── MyLoggedHandlerAsync.cs
│ │ ├── SpyLogProvider.cs
│ │ └── SpyLog.cs
│ ├── CommandProcessors
│ ├── TestDoubles
│ │ ├── MyValidationHandlerAsyncAttribute.cs
│ │ ├── MyPreValidationHandlerAsyncAttribute.cs
│ │ ├── FakeErroringMessageProducer.cs
│ │ ├── MyCommandHandlerAsync.cs
│ │ ├── IAmAnAggregate.cs
│ │ ├── MyAggregate.cs
│ │ ├── IRepository.cs
│ │ ├── MyImplicitHandler.cs
│ │ ├── MyMixedImplicitHandler.cs
│ │ ├── MyCommand.cs
│ │ ├── IUnitOfWork.cs
│ │ ├── MyAbortingHandler.cs
│ │ ├── MyDoubleDecoratedHandler.cs
│ │ ├── MyObsoleteCommandHandlerAsync.cs
│ │ ├── MyAbortingHandlerAttribute.cs
│ │ ├── MyLoggingHandlerAttribute.cs
│ │ └── MyValidationHandlerAttribute.cs
│ ├── When_Finding_A_Hander_That_Has_Dependencies.cs
│ └── When_Building_An_Async_Pipeline_That_Has_Sync_Handlers.cs
│ ├── ArrayCache.cs
│ ├── EventSourcing
│ └── TestDoubles
│ │ └── MyStoredCommandHandlerAsync.cs
│ ├── ControlBus
│ ├── When_creating_a_control_bus_sender.cs
│ └── When_receiving_a_stop_message_for_a_connection.cs
│ ├── MessageDispatch
│ └── TestDoubles
│ │ └── FailingEventMessageMapper.cs
│ └── MessagingGateway
│ ├── When_requeuing_a_message_with_supported_but_disabled_delay.cs
│ └── awssqs
│ ├── When_purging_the_queue.cs
│ ├── When_posting_a_message_via_the_messaging_gateway_and_sns_topic_does_not_exist.cs
│ └── When_posting_a_message_via_the_messaging_gateway.cs
├── samples
├── Greetings
│ ├── acceptance_test_message_body.txt
│ ├── ArrayCache.cs
│ ├── Greetings.csproj
│ └── Ports
│ │ └── Commands
│ │ └── GreetingEvent.cs
├── ManagementAndMonitoring
│ ├── acceptance_test_message_body.txt
│ ├── ManualTinyIoc
│ │ └── ArrayCache.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Ports
│ │ └── Commands
│ │ └── GreetingCommand.cs
├── GenericListener
│ ├── Ports
│ │ ├── Indexers
│ │ │ └── IGenericEventIndexer.cs
│ │ ├── Events
│ │ │ ├── Tasks.cs
│ │ │ └── EventStoredEvent.cs
│ │ ├── Attributes
│ │ │ └── LoggingContextHandler.cs
│ │ └── Handlers
│ │ │ └── GenericHandler.cs
│ ├── Adapters
│ │ ├── MessageMappers
│ │ │ └── MapperHelpers.cs
│ │ ├── EventStore
│ │ │ └── EventStoreLogger.cs
│ │ └── Services
│ │ │ └── HandlerConfig.cs
│ ├── Infrastructure
│ │ └── MessageMapperFactory.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── HelloAsyncListeners
│ ├── GreetingEvent.cs
│ ├── TinyIoCAsyncHandlerFactory.cs
│ ├── HelloAsyncListeners.csproj
│ ├── WantToBeGreetedToo.cs
│ ├── WantToBeGreeted.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── IpFyApi.cs
├── DocumentsAndFolders.Sqs.Core
│ ├── Ports
│ │ ├── DB
│ │ │ ├── Folder.cs
│ │ │ ├── Document.cs
│ │ │ └── FakeDatabase.cs
│ │ ├── Events
│ │ │ ├── FolderCreatedEvent.cs
│ │ │ └── DocumentUpdatedEvent.cs
│ │ ├── Mappers
│ │ │ ├── FolderCreatedEventMessageMapper.cs
│ │ │ └── DocumentUpdatedEventMessageMapper.cs
│ │ └── CommandHandlers
│ │ │ ├── FolderCreatedEventHandler.cs
│ │ │ └── DocumentUpdatedEventHandler.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── DocumentsAndFolders.Sqs.Core.csproj
├── GreetingsWindowsService
│ ├── log4net.config
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── GreetingsWindowsService.csproj
│ └── Program.cs
├── EventSourcing
│ ├── ManualTinyIoc
│ │ └── ArrayCache.cs
│ ├── GlobalSuppressions.cs
│ ├── EventSourcing.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Ports
│ │ └── Commands
│ │ └── GreetingCommand.cs
├── AcceptanceTests
│ └── test_tasksAPIi.py
├── GreetingsCoreConsole
│ ├── GreetingsCoreConsole.csproj
│ └── Properties
│ │ └── AssemblyInfo.cs
├── HelloWorld
│ ├── GlobalSuppressions.cs
│ ├── HelloWorld.csproj
│ └── GreetingCommand.cs
├── DocumentsAndFolders.Sqs.EventsGenerator
│ ├── App.config
│ ├── DocumentsAndFolders.Sqs.EventsGenerator.csproj
│ └── Properties
│ │ └── AssemblyInfo.cs
├── ManagementAndMonitoringWindowsService
│ └── ManagementAndMonitoringWindowsService.csproj
├── DocumentsAndFolders.Sqs.WindowsService
│ ├── App.config
│ ├── DocumentsAndFolders.Sqs.WindowsService.csproj
│ └── Properties
│ │ └── AssemblyInfo.cs
├── HelloWorldAsync
│ ├── HelloWorldAsync.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── GreetingCommand.cs
└── ManagementAndMonitoringCoreConsole
│ ├── ManagementAndMonitoringCoreConsole.csproj
│ └── Properties
│ └── AssemblyInfo.cs
├── NuGet.config
├── src
├── Paramore.Brighter.ServiceActivator
│ ├── MessageMappingException.cs
│ ├── MessagePumpSynchronizationContext.cs
│ ├── Ports
│ │ ├── Commands
│ │ │ └── HeartbeatReply.cs
│ │ ├── ConfigurationCommandMessageMapper.cs
│ │ ├── Mappers
│ │ │ └── HeartbeatRequestCommandMessageMapper.cs
│ │ └── ControlBusHandlerFactory.cs
│ ├── IAmAConsumer.cs
│ └── IConsumerFactory.cs
├── Paramore.Brighter.MessagingGateway.RMQ
│ ├── web.config.uninstall.xdt
│ └── MessagingGatewayConfiguration
│ │ └── RmqGatewayBuilder.cs
├── Paramore.Brighter.MessagingGateway.AWSSQS
│ ├── SqsMessage.cs
│ ├── SqsMessageProducerFactory.cs
│ ├── MessageDefaultContractResolver.cs
│ ├── InputChannelFactory.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── Paramore.Brighter
│ ├── IAmAMessageRecoverer.cs
│ ├── IAmAMessageStoreViewerAsync.cs
│ ├── Reply.cs
│ ├── Monitoring
│ │ └── Mappers
│ │ │ └── MonitorEventMessageMapper.cs
│ ├── PostBackItem.cs
│ ├── Request.cs
│ ├── ICommand.cs
│ ├── Actions
│ │ └── DeferMessageAction.cs
│ ├── IAmAMessageProducerFactory.cs
│ ├── IEvent.cs
│ ├── PipelineTracer.cs
│ └── IRequest.cs
├── Paramore.Brighter.MessagingGateway.RESTMS
│ ├── ReadMe.MD
│ ├── app.config
│ └── Parsers
│ │ └── ResultParserException.cs
├── Paramore.Brighter.MessageStore.Sqlite
│ └── DDL Scripts
│ │ └── SQLite
│ │ └── MessageStore.sql
├── Paramore.Brighter.CommandStore.Sqlite
│ ├── DDL Scripts
│ │ └── SQLite
│ │ │ └── CommandStore.sql
│ └── README.md
├── Paramore.Brighter.CommandStore.MsSql
│ ├── DDL Scripts
│ │ └── MSSQL
│ │ │ └── CommandStore.sql
│ └── Properties
│ │ └── AssemblyInfo.cs
└── Paramore.Brighter.MessageStore.MsSql
│ └── DDL Scripts
│ └── MSSQL
│ └── MessageStore.sql
├── .vscode
├── tasks.json
└── launch.json
├── Set-Version.psm1
├── .gitattributes
└── code_of_conduct.md
/help/fti/FTI_121.json:
--------------------------------------------------------------------------------
1 | {"yields":[5177345,41877505,68222977]}
--------------------------------------------------------------------------------
/help/fti/FTI_122.json:
--------------------------------------------------------------------------------
1 | {"zero":[3473409,34144257,35782657,42074113,68288513]}
--------------------------------------------------------------------------------
/LICENCE.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/LICENCE.txt
--------------------------------------------------------------------------------
/help/Item.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Item.gif
--------------------------------------------------------------------------------
/help/Index.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Index.gif
--------------------------------------------------------------------------------
/help/Search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Search.gif
--------------------------------------------------------------------------------
/help/SyncTOC.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/SyncTOC.gif
--------------------------------------------------------------------------------
/help/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/favicon.ico
--------------------------------------------------------------------------------
/docs/overview.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/docs/overview.txt
--------------------------------------------------------------------------------
/help/Collapsed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Collapsed.gif
--------------------------------------------------------------------------------
/help/ExpandAll.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/ExpandAll.bmp
--------------------------------------------------------------------------------
/help/Expanded.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Expanded.gif
--------------------------------------------------------------------------------
/help/Splitter.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/Splitter.gif
--------------------------------------------------------------------------------
/help/icons/CFW.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/CFW.gif
--------------------------------------------------------------------------------
/help/icons/adm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/adm.gif
--------------------------------------------------------------------------------
/help/icons/box.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/box.gif
--------------------------------------------------------------------------------
/help/icons/dev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/dev.gif
--------------------------------------------------------------------------------
/help/icons/exp.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/exp.gif
--------------------------------------------------------------------------------
/help/icons/kw.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw.gif
--------------------------------------------------------------------------------
/help/icons/xna.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/xna.gif
--------------------------------------------------------------------------------
/help/CloseSearch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/CloseSearch.png
--------------------------------------------------------------------------------
/help/CollapseAll.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/CollapseAll.bmp
--------------------------------------------------------------------------------
/help/icons/arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/arch.gif
--------------------------------------------------------------------------------
/help/icons/big_kw.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/big_kw.gif
--------------------------------------------------------------------------------
/help/icons/drpup.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/drpup.gif
--------------------------------------------------------------------------------
/help/icons/expall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/expall.gif
--------------------------------------------------------------------------------
/help/icons/footer.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/footer.gif
--------------------------------------------------------------------------------
/help/icons/kw_adm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_adm.gif
--------------------------------------------------------------------------------
/help/icons/kw_dev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_dev.gif
--------------------------------------------------------------------------------
/help/icons/load.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/load.gif
--------------------------------------------------------------------------------
/help/icons/note.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/note.gif
--------------------------------------------------------------------------------
/help/icons/pencil.GIF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pencil.GIF
--------------------------------------------------------------------------------
/help/icons/save.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/save.gif
--------------------------------------------------------------------------------
/help/icons/static.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/static.gif
--------------------------------------------------------------------------------
/docs/brigher_canon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/docs/brigher_canon.jpg
--------------------------------------------------------------------------------
/help/icons/Caution.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/Caution.gif
--------------------------------------------------------------------------------
/help/icons/adm_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/adm_arch.gif
--------------------------------------------------------------------------------
/help/icons/adm_dev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/adm_dev.gif
--------------------------------------------------------------------------------
/help/icons/big_adm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/big_adm.gif
--------------------------------------------------------------------------------
/help/icons/big_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/big_arch.gif
--------------------------------------------------------------------------------
/help/icons/big_dev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/big_dev.gif
--------------------------------------------------------------------------------
/help/icons/collall.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/collall.gif
--------------------------------------------------------------------------------
/help/icons/collapse.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/collapse.gif
--------------------------------------------------------------------------------
/help/icons/copycode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/copycode.gif
--------------------------------------------------------------------------------
/help/icons/dev_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/dev_arch.gif
--------------------------------------------------------------------------------
/help/icons/dropdown.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/dropdown.gif
--------------------------------------------------------------------------------
/help/icons/drpdown.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/drpdown.gif
--------------------------------------------------------------------------------
/help/icons/filter1a.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/filter1a.gif
--------------------------------------------------------------------------------
/help/icons/filter1c.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/filter1c.gif
--------------------------------------------------------------------------------
/help/icons/gradient.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/gradient.gif
--------------------------------------------------------------------------------
/help/icons/greychck.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/greychck.gif
--------------------------------------------------------------------------------
/help/icons/kw_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_arch.gif
--------------------------------------------------------------------------------
/help/icons/privenum.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privenum.gif
--------------------------------------------------------------------------------
/help/icons/protenum.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protenum.gif
--------------------------------------------------------------------------------
/help/icons/pubclass.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubclass.gif
--------------------------------------------------------------------------------
/help/icons/pubenum.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubenum.gif
--------------------------------------------------------------------------------
/help/icons/pubevent.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubevent.gif
--------------------------------------------------------------------------------
/help/icons/pubfield.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubfield.gif
--------------------------------------------------------------------------------
/help/icons/security.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/security.gif
--------------------------------------------------------------------------------
/help/icons/slMobile.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/slMobile.gif
--------------------------------------------------------------------------------
/help/images/LT_tab.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/LT_tab.gif
--------------------------------------------------------------------------------
/help/images/RT_tab.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/RT_tab.gif
--------------------------------------------------------------------------------
/help/icons/CopyCode_h.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/CopyCode_h.gif
--------------------------------------------------------------------------------
/help/icons/LastChild.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/LastChild.gif
--------------------------------------------------------------------------------
/help/icons/alert_note.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/alert_note.gif
--------------------------------------------------------------------------------
/help/icons/expand_all.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/expand_all.gif
--------------------------------------------------------------------------------
/help/icons/greencheck.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/greencheck.gif
--------------------------------------------------------------------------------
/help/icons/kw_adm_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_adm_arch.gif
--------------------------------------------------------------------------------
/help/icons/kw_adm_dev.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_adm_dev.gif
--------------------------------------------------------------------------------
/help/icons/kw_dev_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_dev_arch.gif
--------------------------------------------------------------------------------
/help/icons/load_hover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/load_hover.gif
--------------------------------------------------------------------------------
/help/icons/privclass.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privclass.gif
--------------------------------------------------------------------------------
/help/icons/privevent.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privevent.gif
--------------------------------------------------------------------------------
/help/icons/privfield.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privfield.gif
--------------------------------------------------------------------------------
/help/icons/privmethod.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privmethod.gif
--------------------------------------------------------------------------------
/help/icons/protclass.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protclass.gif
--------------------------------------------------------------------------------
/help/icons/protevent.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protevent.gif
--------------------------------------------------------------------------------
/help/icons/protfield.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protfield.gif
--------------------------------------------------------------------------------
/help/icons/protmethod.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protmethod.gif
--------------------------------------------------------------------------------
/help/icons/pubdelegate.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubdelegate.gif
--------------------------------------------------------------------------------
/help/icons/pubmethod.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubmethod.gif
--------------------------------------------------------------------------------
/help/icons/puboperator.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/puboperator.gif
--------------------------------------------------------------------------------
/help/icons/pubproperty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubproperty.gif
--------------------------------------------------------------------------------
/help/icons/save_hover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/save_hover.gif
--------------------------------------------------------------------------------
/help/icons/seealso1a.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/seealso1a.gif
--------------------------------------------------------------------------------
/help/icons/seealso1c.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/seealso1c.gif
--------------------------------------------------------------------------------
/help/images/alert_note.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/alert_note.gif
--------------------------------------------------------------------------------
/help/images/lt_search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/lt_search.gif
--------------------------------------------------------------------------------
/help/images/msg-icon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/msg-icon.gif
--------------------------------------------------------------------------------
/help/images/rt_search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/rt_search.gif
--------------------------------------------------------------------------------
/help/images/searchicon.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/searchicon.gif
--------------------------------------------------------------------------------
/help/styles/msdn10/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/bg.png
--------------------------------------------------------------------------------
/lib/Hawk.2.0.0-beta5.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/lib/Hawk.2.0.0-beta5.nupkg
--------------------------------------------------------------------------------
/help/icons/adm_dev_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/adm_dev_arch.gif
--------------------------------------------------------------------------------
/help/icons/alert_caution.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/alert_caution.gif
--------------------------------------------------------------------------------
/help/icons/collapse_all.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/collapse_all.gif
--------------------------------------------------------------------------------
/help/icons/dropdownHover.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/dropdownHover.gif
--------------------------------------------------------------------------------
/help/icons/privdelegate.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privdelegate.gif
--------------------------------------------------------------------------------
/help/icons/privextension.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privextension.gif
--------------------------------------------------------------------------------
/help/icons/privinterface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privinterface.gif
--------------------------------------------------------------------------------
/help/icons/privproperty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privproperty.gif
--------------------------------------------------------------------------------
/help/icons/privstructure.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privstructure.gif
--------------------------------------------------------------------------------
/help/icons/protdelegate.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protdelegate.gif
--------------------------------------------------------------------------------
/help/icons/protextension.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protextension.gif
--------------------------------------------------------------------------------
/help/icons/protinterface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protinterface.gif
--------------------------------------------------------------------------------
/help/icons/protoperator.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protoperator.gif
--------------------------------------------------------------------------------
/help/icons/protproperty.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protproperty.gif
--------------------------------------------------------------------------------
/help/icons/protstructure.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protstructure.gif
--------------------------------------------------------------------------------
/help/icons/pubextension.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubextension.gif
--------------------------------------------------------------------------------
/help/icons/pubinterface.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubinterface.gif
--------------------------------------------------------------------------------
/help/icons/pubstructure.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubstructure.gif
--------------------------------------------------------------------------------
/help/images/msg-incoming.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/msg-incoming.gif
--------------------------------------------------------------------------------
/help/images/msg-outgoing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/msg-outgoing.gif
--------------------------------------------------------------------------------
/help/images/slice_search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/slice_search.gif
--------------------------------------------------------------------------------
/help/styles/msdn10/clear.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/clear.gif
--------------------------------------------------------------------------------
/help/icons/alert_security.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/alert_security.gif
--------------------------------------------------------------------------------
/help/icons/drpdown_orange.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/drpdown_orange.gif
--------------------------------------------------------------------------------
/help/icons/header_prev_next.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/header_prev_next.jpg
--------------------------------------------------------------------------------
/help/icons/kw_adm_dev_arch.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/kw_adm_dev_arch.gif
--------------------------------------------------------------------------------
/help/icons/privenumeration.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/privenumeration.gif
--------------------------------------------------------------------------------
/help/icons/protenumeration.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/protenumeration.gif
--------------------------------------------------------------------------------
/help/icons/pubenumeration.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/pubenumeration.gif
--------------------------------------------------------------------------------
/help/icons/requirements1a.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/requirements1a.gif
--------------------------------------------------------------------------------
/help/icons/requirements1c.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/requirements1c.gif
--------------------------------------------------------------------------------
/help/styles/msdn10/bullet.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/bullet.gif
--------------------------------------------------------------------------------
/help/styles/msdn10/internav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/internav.png
--------------------------------------------------------------------------------
/help/icons/copycodeHighlight.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/copycodeHighlight.gif
--------------------------------------------------------------------------------
/help/icons/drpdown_orange_up.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/drpdown_orange_up.gif
--------------------------------------------------------------------------------
/help/styles/msdn10/bg_vstudio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/bg_vstudio.png
--------------------------------------------------------------------------------
/docs/Figures/hexagonal_unittest.vsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/docs/Figures/hexagonal_unittest.vsd
--------------------------------------------------------------------------------
/help/images/lightweight_topnav.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/lightweight_topnav.png
--------------------------------------------------------------------------------
/help/styles/msdn10/contentpane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/contentpane.png
--------------------------------------------------------------------------------
/lib/Hawk.2.0.0-beta5.symbols.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/lib/Hawk.2.0.0-beta5.symbols.nupkg
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 |
3 | [assembly: Xunit.CollectionBehavior(MaxParallelThreads = 1)]
4 |
--------------------------------------------------------------------------------
/help/styles/msdn10/contentpaneleft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/contentpaneleft.png
--------------------------------------------------------------------------------
/help/styles/msdn10/subnav_vstudio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/subnav_vstudio.png
--------------------------------------------------------------------------------
/docs/Figures/Command Sequence Diagram.vsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/docs/Figures/Command Sequence Diagram.vsd
--------------------------------------------------------------------------------
/docs/Figures/hexagonal_architecture.vsd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/docs/Figures/hexagonal_architecture.vsd
--------------------------------------------------------------------------------
/help/icons/header_sql_tutorial_blank.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/header_sql_tutorial_blank.jpg
--------------------------------------------------------------------------------
/help/icons/header_sql_tutorial_logo.GIF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/icons/header_sql_tutorial_logo.GIF
--------------------------------------------------------------------------------
/help/images/lightweight_topnav_slice.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/lightweight_topnav_slice.gif
--------------------------------------------------------------------------------
/help/images/msdn2010branding-stripe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/msdn2010branding-stripe.png
--------------------------------------------------------------------------------
/help/images/msdn2010branding-stripe1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/msdn2010branding-stripe1.png
--------------------------------------------------------------------------------
/help/styles/msdn10/adart_repository.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/adart_repository.png
--------------------------------------------------------------------------------
/help/styles/msdn10/contentpaneright.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/styles/msdn10/contentpaneright.png
--------------------------------------------------------------------------------
/help/images/030c41d9079671d09a62d8e2c1db6973.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/josephwoodward/Brighter/master/help/images/030c41d9079671d09a62d8e2c1db6973.gif
--------------------------------------------------------------------------------
/samples/Greetings/acceptance_test_message_body.txt:
--------------------------------------------------------------------------------
1 | Header
2 | ------
3 | MessageType=2
4 |
5 | Body
6 | ----
7 | {"Greeting":"Hello World","Id":"60457970-6fe6-482e-aad4-8e802652136c"}
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoring/acceptance_test_message_body.txt:
--------------------------------------------------------------------------------
1 | Header
2 | ------
3 | MessageType=1
4 |
5 | Body
6 | ----
7 | {"Greeting":"Hello World","Id":"60457970-6fe6-482e-aad4-8e802652136c"}
--------------------------------------------------------------------------------
/help/styles/lw-miranda.css:
--------------------------------------------------------------------------------
1 | div.imhistory
2 | {
3 | border: 1px solid #BBB;
4 | }
5 |
6 | .imhistory-title
7 | {
8 | border-bottom: 1px solid #BBB;
9 | padding: 3px;
10 | }
11 |
12 |
13 | .imhistory-content
14 | {
15 | margin: 3px;
16 | }
--------------------------------------------------------------------------------
/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/help/fti/FTI_106.json:
--------------------------------------------------------------------------------
1 | {"just":[3473409,3670017,4915201,7602177,14680065,17301505,18481153,23199745,25690113,35127297,39649281,46399489,48627713,49545217,52035585],"job":[16252934,62586882,65273858],"jobid":[20185092,62586881,65273857],"joins":[26017793,28966913,42008580]}
--------------------------------------------------------------------------------
/samples/GenericListener/Ports/Indexers/IGenericEventIndexer.cs:
--------------------------------------------------------------------------------
1 | using GenericListener.Ports.Events;
2 |
3 | namespace GenericListener.Ports.Indexers
4 | {
5 | public interface IGenericFeedEventIndexer where T : EventStoredEvent
6 | {
7 | void Index(T @event);
8 | }
9 | }
--------------------------------------------------------------------------------
/samples/GenericListener/Ports/Events/Tasks.cs:
--------------------------------------------------------------------------------
1 | namespace GenericListener.Ports.Events
2 | {
3 | public class GenericTask : EventStoredEvent { }
4 | public class GenericTaskAddedEvent : GenericTask { }
5 | public class GenericTaskEditedEvent : GenericTask { }
6 | public class GenericTaskCompletedEvent : GenericTask { }
7 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/MessageMappingException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.ServiceActivator
4 | {
5 | internal class MessageMappingException : Exception
6 | {
7 | public MessageMappingException(string message, Exception exception) : base(message, exception) { }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.RMQ/web.config.uninstall.xdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/GreetingEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter;
3 |
4 | namespace HelloAsyncListeners
5 | {
6 | public class GreetingEvent : Event
7 | {
8 | public GreetingEvent(string name) : base(new Guid())
9 | {
10 | Name = name;
11 | }
12 |
13 | public string Name { get; private set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.AWSSQS/SqsMessage.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.MessagingGateway.AWSSQS
4 | {
5 | ///
6 | /// This class is used to deserialize a SNS backed SQS message
7 | ///
8 | public class SqsMessage
9 | {
10 | public Guid MessageId { get; set; }
11 |
12 | public string Message { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/DB/Folder.cs:
--------------------------------------------------------------------------------
1 | namespace DocumentsAndFolders.Sqs.Core.Ports.DB
2 | {
3 | public class Folder
4 | {
5 | public Folder(int folderId, string title)
6 | {
7 | Title = title;
8 | FolderId = folderId;
9 | }
10 |
11 | public int FolderId { get; private set; }
12 |
13 | public string Title { get; private set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/GreetingsWindowsService/log4net.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "dotnet",
4 | "isShellCommand": true,
5 | "args": [],
6 | "tasks": [
7 | {
8 | "taskName": "build",
9 | "args": [
10 | "${workspaceRoot}\\Paramore.Brighter.MessageViewer.Console\\project.json"
11 | ],
12 | "isBuildCommand": true,
13 | "problemMatcher": "$msCompile"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/samples/GenericListener/Ports/Attributes/LoggingContextHandler.cs:
--------------------------------------------------------------------------------
1 | using Paramore.Brighter;
2 | using Paramore.Brighter.Logging.Attributes;
3 |
4 | namespace GenericListener.Ports.Attributes
5 | {
6 | public class LoggingContextHandler : RequestHandler where TRequest : class, IRequest
7 | {
8 | [RequestLogging(0, HandlerTiming.Before)]
9 | public override TRequest Handle(TRequest command)
10 | {
11 | return base.Handle(command);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/Logging/TestDoubles/MyLoggedHandler.cs:
--------------------------------------------------------------------------------
1 | using Paramore.Brighter.Logging.Attributes;
2 | using Paramore.Brighter.Tests.CommandProcessors.TestDoubles;
3 |
4 | namespace Paramore.Brighter.Tests.Logging.TestDoubles
5 | {
6 | class MyLoggedHandler : RequestHandler
7 | {
8 | [RequestLogging(0, HandlerTiming.Before)]
9 | public override MyCommand Handle(MyCommand command)
10 | {
11 | return base.Handle(command);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter/IAmAMessageRecoverer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Paramore.Brighter
4 | {
5 | ///
6 | /// Interface IAmAMessageRecoverer
7 | /// Used to support reposting a message from a to a broker via
8 | ///
9 | public interface IAmAMessageRecoverer
10 | {
11 | void Repost(List messageIds, IAmAMessageStore messageStore, IAmAMessageProducer messageProducer);
12 | }
13 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/Events/FolderCreatedEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter;
3 |
4 | namespace DocumentsAndFolders.Sqs.Core.Ports.Events
5 | {
6 | public class FolderCreatedEvent : Event {
7 | public FolderCreatedEvent(Guid id, int folderId, string title)
8 | : base(id)
9 | {
10 | FolderId = folderId;
11 | Title = title;
12 | }
13 |
14 | public int FolderId { get; set; }
15 |
16 | public string Title { get; set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/DB/Document.cs:
--------------------------------------------------------------------------------
1 | namespace DocumentsAndFolders.Sqs.Core.Ports.DB
2 | {
3 | public class Document
4 | {
5 | public Document(int documentId, int folderId, string title)
6 | {
7 | Title = title;
8 | FolderId = folderId;
9 | DocumentId = documentId;
10 | }
11 |
12 | public int DocumentId { get; private set; }
13 |
14 | public int FolderId { get; private set; }
15 |
16 | public string Title { get; private set; }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyValidationHandlerAsyncAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
4 | {
5 | class MyValidationHandlerAsyncAttribute : RequestHandlerAttribute
6 | {
7 | public MyValidationHandlerAsyncAttribute (int step)
8 | : base(step)
9 | {
10 | }
11 |
12 | public override Type GetHandlerType()
13 | {
14 | return typeof(MyValidationHandlerAsync<>);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Set-Version.psm1:
--------------------------------------------------------------------------------
1 | function Set-Version {
2 | param(
3 | [string] $csprojPattern,
4 | [string] $version
5 | )
6 | $versionTag = "VersionPrefix";
7 |
8 | Get-ChildItem $csprojPattern | ForEach-Object {
9 | $csproj = Get-Content -Raw -Path $_.FullName
10 | $originalVersion = [regex]::match($csproj, "<$versionTag>(.*)$versionTag>").Groups[1].Value
11 | $csproj.Replace("<$versionTag>$originalVersion$versionTag>", "<$versionTag>$version$versionTag>") | Set-Content $_.FullName
12 | }
13 |
14 | return $buildVersion
15 | }
16 |
17 | Export-ModuleMember -Function Set-Version
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyPreValidationHandlerAsyncAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
4 | {
5 | class MyPreValidationHandlerAsyncAttribute : RequestHandlerAttribute
6 | {
7 | public MyPreValidationHandlerAsyncAttribute(int step, HandlerTiming timing)
8 | : base(step, timing)
9 | {
10 | }
11 |
12 | public override Type GetHandlerType()
13 | {
14 | return typeof(MyValidationHandlerAsync<>);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/GenericListener/Adapters/MessageMappers/MapperHelpers.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json.Linq;
2 |
3 | namespace GenericListener.Adapters.MessageMappers
4 | {
5 | public static class MapperHelpers
6 | {
7 | public static bool HasProperty(this JObject jsonObject, string propertyName)
8 | {
9 | return jsonObject.Property(propertyName) != null;
10 | }
11 |
12 | public static bool HasProperty(this JToken jsonObject, string propertyName)
13 | {
14 | return ((JObject)jsonObject).Property(propertyName) != null;
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.AWSSQS/SqsMessageProducerFactory.cs:
--------------------------------------------------------------------------------
1 | using Amazon.Runtime;
2 |
3 | namespace Paramore.Brighter.MessagingGateway.AWSSQS
4 | {
5 | public class SqsMessageProducerFactory : IAmAMessageProducerFactory
6 | {
7 | private readonly AWSCredentials _credentials;
8 | public SqsMessageProducerFactory(AWSCredentials credentials)
9 | {
10 | _credentials = credentials;
11 | }
12 |
13 | public IAmAMessageProducer Create()
14 | {
15 | return new SqsMessageProducer(_credentials);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/help/fti/FTI_107.json:
--------------------------------------------------------------------------------
1 | {"key":[1048577,3670017,4784129,7274497,7471109,9240577,10747905,13303809,17301506,17629185,17956865,20578308,25100289,26935297,27328513,29818884,36438017,37486593,37748737,40042497,40173569,40894465,44695553,46071809,47906817,49545217,53542913,58195969,59310081,59375617,59572225,61276161,61472769,67043329],"keyvaluepair":[2228227,4194307,25493507,46989315,52690947,54394883],"know":[3473412,3670020,4915204,7602180,14680068,17301508,18481156,20316161,23199748,25296897,25690116,35127297,37289985,39649284,42336257,46399492,47054849,48627716,49545220,52035588,68288513],"knowing":[3473409,62652417],"kill":[27328513,37486593,49545217]}
--------------------------------------------------------------------------------
/samples/Greetings/ArrayCache.cs:
--------------------------------------------------------------------------------
1 | namespace Greetings
2 | {
3 | ///
4 | /// A cache for empty arrays.
5 | ///
6 | public class ArrayCache
7 | {
8 | ///
9 | /// Gets a cached, empty array of the specified type.
10 | ///
11 | /// the type of array to get.
12 | public static T[] Empty()
13 | {
14 | return EmptyArray.Value;
15 | }
16 |
17 | private static class EmptyArray
18 | {
19 | public static readonly T[] Value = new T[0];
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/Events/DocumentUpdatedEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter;
3 |
4 | namespace DocumentsAndFolders.Sqs.Core.Ports.Events
5 | {
6 | public class DocumentUpdatedEvent : Event
7 | {
8 | public DocumentUpdatedEvent(Guid id, int documentId, string title, int folderId)
9 | : base(id)
10 | {
11 | DocumentId = documentId;
12 | Title = title;
13 | FolderId = folderId;
14 | }
15 |
16 | public int DocumentId { get; set; }
17 |
18 | public string Title { get; set; }
19 |
20 | public int FolderId { get; set; }
21 | }
22 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/ArrayCache.cs:
--------------------------------------------------------------------------------
1 | namespace Paramore.Brighter.Tests
2 | {
3 | ///
4 | /// A cache for empty arrays.
5 | ///
6 | public class ArrayCache
7 | {
8 | ///
9 | /// Gets a cached, empty array of the specified type.
10 | ///
11 | /// the type of array to get.
12 | public static T[] Empty()
13 | {
14 | return EmptyArray.Value;
15 | }
16 |
17 | private static class EmptyArray
18 | {
19 | public static readonly T[] Value = new T[0];
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
19 | # Fix issues with githu/linguist
20 | **/*.html linguist-documentation
21 | **/*.css linguist-documentation
22 | **/*.js linguist-documentation
23 | docs/* linguist-documentation
24 | help/* linguist-documentation
25 |
--------------------------------------------------------------------------------
/samples/EventSourcing/ManualTinyIoc/ArrayCache.cs:
--------------------------------------------------------------------------------
1 | namespace EventSourcing.ManualTinyIoc
2 | {
3 | ///
4 | /// A cache for empty arrays.
5 | ///
6 | public class ArrayCache
7 | {
8 | ///
9 | /// Gets a cached, empty array of the specified type.
10 | ///
11 | /// the type of array to get.
12 | public static T[] Empty()
13 | {
14 | return EmptyArray.Value;
15 | }
16 |
17 | private static class EmptyArray
18 | {
19 | public static readonly T[] Value = new T[0];
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/MessagePumpSynchronizationContext.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace Paramore.Brighter.ServiceActivator
4 | {
5 | internal class MessagePumpSynchronizationContext : SynchronizationContext
6 | {
7 | private readonly IAmAChannel _channel;
8 |
9 | public MessagePumpSynchronizationContext(IAmAChannel channel)
10 | {
11 | _channel = channel;
12 | }
13 |
14 | public override void Post(SendOrPostCallback callback, object state)
15 | {
16 | _channel.Enqueue(new Message(new MessageHeader(), new MessageBody(new PostBackItem(callback, state))));
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoring/ManualTinyIoc/ArrayCache.cs:
--------------------------------------------------------------------------------
1 | namespace ManagementAndMonitoring.ManualTinyIoc
2 | {
3 | ///
4 | /// A cache for empty arrays.
5 | ///
6 | public class ArrayCache
7 | {
8 | ///
9 | /// Gets a cached, empty array of the specified type.
10 | ///
11 | /// the type of array to get.
12 | public static T[] Empty()
13 | {
14 | return EmptyArray.Value;
15 | }
16 |
17 | private static class EmptyArray
18 | {
19 | public static readonly T[] Value = new T[0];
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/Logging/TestDoubles/MyLoggedHandlerAsync.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Threading.Tasks;
3 | using Paramore.Brighter.Logging.Attributes;
4 | using Paramore.Brighter.Tests.CommandProcessors.TestDoubles;
5 |
6 | namespace Paramore.Brighter.Tests.Logging.TestDoubles
7 | {
8 | internal class MyLoggedHandlerAsync : RequestHandlerAsync
9 | {
10 | [RequestLoggingAsync(0, HandlerTiming.Before)]
11 | public override Task HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
12 | {
13 | return base.HandleAsync(command, cancellationToken);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.RESTMS/ReadMe.MD:
--------------------------------------------------------------------------------
1 | # Building #
2 | ## Dependency on IdentityModelv2 Hawk ##
3 | We depend on Thinktecture's Identity Model for support for Hawk authentication. There is no .NET Core version of Identity Model but there is
4 | an IdentityModelv2. However, the Hawk model has not been ported to that yet and it is in beta. For this reason I have forked IdentityModelv2
5 | https://github.com/iancooper/IdentityModelv2 and retro-fitted the Hawk support. Although this might make it back to IdentityModelv2 via a PR
6 | it also may not. For now though there is a nuget package wrapper for the forked version of this project in the Lib folder. You will thus need to add
7 | the Lib folder to your list of NuGet package sources to get this to build.
8 |
9 |
--------------------------------------------------------------------------------
/help/scripts/EventUtilities.js:
--------------------------------------------------------------------------------
1 |
2 | // attach a handler to a particular event on an element
3 | // in a browser-independent way
4 | function registerEventHandler (element, event, handler) {
5 | if (element.attachEvent) {
6 | // MS registration model
7 | element.attachEvent('on' + event, handler);
8 | } else if (element.addEventListener) {
9 | // NN (W4C) regisration model
10 | element.addEventListener(event, handler, false);
11 | } else {
12 | // old regisration model as fall-back
13 | element[event] = handler;
14 | }
15 | }
16 |
17 | // get a delegate that refers to an instance method
18 | function getInstanceDelegate (obj, methodName) {
19 | return( function(e) {
20 | e = e || window.event;
21 | return obj[methodName](e);
22 | } );
23 | }
24 |
--------------------------------------------------------------------------------
/samples/AcceptanceTests/test_tasksAPIi.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import json
3 |
4 |
5 | def test_we_can_get_all_tasks():
6 | payload = {'taskName': 'test1', 'taskDescription': 'Attempting to test an api from python', 'dueDate': '2012-04-23T18:25:43.511Z'}
7 | post_headers = {'Content-Type': 'application/json'}
8 | post = requests.post('http://localhost:49743/tasks', data=json.dumps(payload), headers=post_headers)
9 | assert post.status_code == 201
10 | assert post.text == '{"dueDate":"23\\/04\\/2012 19:25:43","taskDescription":"Attempting to test an api from python","taskName":"test1"}'
11 |
12 | get_headers = {'Accept': 'application/json'}
13 | get = requests.get('http://localhost:49743/tasks', headers=get_headers)
14 | assert get.status_code == 200
15 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/EventSourcing/TestDoubles/MyStoredCommandHandlerAsync.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using System.Threading.Tasks;
3 | using Paramore.Brighter.Eventsourcing.Attributes;
4 | using Paramore.Brighter.Tests.CommandProcessors.TestDoubles;
5 |
6 | namespace Paramore.Brighter.Tests.EventSourcing.TestDoubles
7 | {
8 | internal class MyStoredCommandHandlerAsync : RequestHandlerAsync
9 | {
10 | [UseCommandSourcingAsync(1, HandlerTiming.Before)]
11 | public override async Task HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
12 | {
13 | return await base.HandleAsync(command, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/help/styles/msdn10/Msdn10_vstudio-bn20091118.css:
--------------------------------------------------------------------------------
1 |
2 | #JelloWrapper {
3 | background:url('bg_vstudio.png') no-repeat 200px 0
4 | }
5 |
6 | * html .internav {
7 | background-color:#21244a
8 | }
9 |
10 | * html .internav a:hover {
11 | background-color:#181c39
12 | }
13 |
14 | .internav a.active, .internav a.active:hover {
15 | background-color:#735aaf
16 | }
17 |
18 | * html .internav a.active, * html .internav a.active:hover {
19 | background-color:#7359ad
20 | }
21 |
22 | .LocalNavigation {
23 | background:url('subnav_vstudio.png') repeat-y top right
24 | }
25 |
26 | * html .LocalNavigation {
27 | background-color:#7359ad;
28 | background-image:none
29 | }
30 |
31 | .LocalNavigation .TabOff a:hover {
32 | background-color:#634d9c
33 | }
34 |
35 | .LocalNavigation .TabOn {
36 | background-color:#4c3c79
37 | }
38 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessageStore.Sqlite/DDL Scripts/SQLite/MessageStore.sql:
--------------------------------------------------------------------------------
1 | -- Script Date: 03/07/2015 12:03 - ErikEJ.SqlCeScripting version 3.5.2.49
2 | -- Database information:
3 | -- Locale Identifier: 1033
4 | -- Encryption Mode:
5 | -- Case Sensitive: False
6 | -- ServerVersion: 4.0.8876.1
7 | -- DatabaseSize: 84 KB
8 | -- Created: 30/06/2015 23:53
9 |
10 | -- User Table information:
11 | -- Number of tables: 1
12 | -- Messages: 0 row(s)
13 |
14 | SELECT 1;
15 | PRAGMA foreign_keys=OFF;
16 | BEGIN TRANSACTION;
17 | CREATE TABLE [Messages] (
18 | [MessageId] uniqueidentifier NOT NULL
19 | , [Topic] nvarchar(255) NULL
20 | , [MessageType] nvarchar(32) NULL
21 | , [Timestamp] datetime NULL
22 | , [HeaderBag] ntext NULL
23 | , [Body] ntext NULL
24 | , CONSTRAINT [PK_MessageId] PRIMARY KEY ([MessageId])
25 | );
26 | COMMIT;
27 |
28 |
--------------------------------------------------------------------------------
/samples/GreetingsCoreConsole/GreetingsCoreConsole.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/samples/EventSourcing/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 | //
6 | // To add a suppression to this file, right-click the message in the
7 | // Code Analysis results, point to "Suppress Message", and click
8 | // "In Suppression File".
9 | // You do not need to add suppressions to this file manually.
10 |
11 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object)", Scope = "member", Target = "HelloWorld.GreetingCommandHandler.#Handle(HelloWorld.GreetingCommand)")]
12 |
--------------------------------------------------------------------------------
/samples/HelloWorld/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // This file is used by Code Analysis to maintain SuppressMessage
2 | // attributes that are applied to this project.
3 | // Project-level suppressions either have no target or are given
4 | // a specific target and scoped to a namespace, type, member, etc.
5 | //
6 | // To add a suppression to this file, right-click the message in the
7 | // Code Analysis results, point to "Suppress Message", and click
8 | // "In Suppression File".
9 | // You do not need to add suppressions to this file manually.
10 |
11 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object)", Scope = "member", Target = "HelloWorld.GreetingCommandHandler.#Handle(HelloWorld.GreetingCommand)")]
12 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.CommandStore.Sqlite/DDL Scripts/SQLite/CommandStore.sql:
--------------------------------------------------------------------------------
1 | -- Script Date: 03/07/2015 12:15 - ErikEJ.SqlCeScripting version 3.5.2.49
2 | -- Database information:
3 | -- Locale Identifier: 2057
4 | -- Encryption Mode:
5 | -- Case Sensitive: False
6 | -- Database: C:\Users\SUNDANCE\iancooper\Paramore\Brighter\Examples\Tasks\App_Data\CommandStore.sdf
7 | -- ServerVersion: 4.0.8876.1
8 | -- DatabaseSize: 64 KB
9 | -- Created: 03/07/2015 12:10
10 |
11 | -- User Table information:
12 | -- Number of tables: 1
13 | -- Commands: 0 row(s)
14 |
15 | SELECT 1;
16 | PRAGMA foreign_keys=OFF;
17 | BEGIN TRANSACTION;
18 | CREATE TABLE [Commands] (
19 | [CommandId] uniqueidentifier NOT NULL
20 | , [CommandType] nvarchar(256) NULL
21 | , [CommandBody] ntext NULL
22 | , [Timestamp] datetime NULL
23 | , CONSTRAINT [PK_MessageId] PRIMARY KEY ([CommandId])
24 | );
25 | COMMIT;
26 |
27 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/FakeErroringMessageProducer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
4 | {
5 | public class FakeErroringMessageProducer : IAmAMessageProducer
6 | {
7 | public int SentCalledCount { get; set; }
8 | ///
9 | /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
10 | ///
11 | public void Dispose() { }
12 |
13 | ///
14 | /// Sends the specified message.
15 | ///
16 | /// The message.
17 | /// Task.
18 | public void Send(Message message)
19 | {
20 | SentCalledCount++;
21 | throw new Exception();
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.CommandStore.MsSql/DDL Scripts/MSSQL/CommandStore.sql:
--------------------------------------------------------------------------------
1 | -- User Table information:
2 | -- Number of tables: 1
3 | -- Commands: 0 row(s)
4 |
5 | PRINT 'Creating Commands table'
6 | CREATE TABLE [Commands] (
7 | [Id] [BIGINT] NOT NULL IDENTITY
8 | , [CommandId] uniqueidentifier NOT NULL
9 | , [CommandType] nvarchar(256) NULL
10 | , [CommandBody] ntext NULL
11 | , [Timestamp] datetime NULL
12 | , PRIMARY KEY ( [Id] )
13 | );
14 | GO
15 | IF (NOT EXISTS ( SELECT *
16 | FROM sys.indexes
17 | WHERE name = 'UQ_Commands__CommandId'
18 | AND object_id = OBJECT_ID('Commands') )
19 | )
20 | BEGIN
21 | PRINT 'Creating a unique index on the CommandId column of the Command table...'
22 |
23 | CREATE UNIQUE NONCLUSTERED INDEX UQ_Commands__CommandId
24 | ON Commands(CommandId)
25 | END
26 | GO
27 | Print 'Done'
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.EventsGenerator/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
19 |
--------------------------------------------------------------------------------
/samples/GenericListener/Ports/Handlers/GenericHandler.cs:
--------------------------------------------------------------------------------
1 | using GenericListener.Ports.Events;
2 | using GenericListener.Ports.Indexers;
3 | using log4net;
4 | using Paramore.Brighter;
5 |
6 | namespace GenericListener.Ports.Handlers
7 | {
8 | public class GenericHandler : RequestHandler where T : EventStoredEvent
9 | {
10 | private static readonly ILog _logger = LogManager.GetLogger(typeof(GenericHandler));
11 |
12 | private readonly IGenericFeedEventIndexer _indexer;
13 |
14 | public GenericHandler(IGenericFeedEventIndexer indexer)
15 | {
16 | _indexer = indexer;
17 | }
18 |
19 | public override T Handle(T command)
20 | {
21 | _logger.InfoFormat("Received {1} {0}", command.Id, typeof(T).FullName);
22 |
23 | _indexer.Index(command);
24 |
25 | return base.Handle(command);
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/samples/GreetingsCoreConsole/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("GreetingsCoreConsole")]
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("73287a8f-c4ec-46ad-8c6f-2cdfb7aca789")]
20 |
--------------------------------------------------------------------------------
/samples/GreetingsWindowsService/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("GreetingsWindowsService")]
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("1fce5320-e949-41a4-a3b9-a8369f2b4ac2")]
20 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/Mappers/FolderCreatedEventMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using DocumentsAndFolders.Sqs.Core.Ports.Events;
2 | using Newtonsoft.Json;
3 | using Paramore.Brighter;
4 |
5 | namespace DocumentsAndFolders.Sqs.Core.Ports.Mappers
6 | {
7 | public class FolderCreatedEventMessageMapper : IAmAMessageMapper
8 | {
9 | public Message MapToMessage(FolderCreatedEvent request)
10 | {
11 | var header = new MessageHeader(messageId: request.Id, topic: "FolderCreatedEvent", messageType: MessageType.MT_EVENT);
12 | var body = new MessageBody(JsonConvert.SerializeObject(request));
13 | var message = new Message(header, body);
14 | return message;
15 | }
16 |
17 | public FolderCreatedEvent MapToRequest(Message message)
18 | {
19 | return JsonConvert.DeserializeObject(message.Body.Value);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/Logging/TestDoubles/SpyLogProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter.Logging;
3 |
4 | namespace Paramore.Brighter.Tests.Logging.TestDoubles
5 | {
6 | internal class SpyLogProvider : ILogProvider
7 | {
8 | private readonly SpyLog _logger;
9 |
10 | public SpyLogProvider(SpyLog logger)
11 | {
12 | _logger = logger;
13 | }
14 |
15 | public Logger GetLogger(string name)
16 | {
17 | return (logLevel, messageFunc, exception, formatParameters) => _logger.Log(logLevel, messageFunc, exception, formatParameters);
18 | }
19 |
20 | public IDisposable OpenNestedContext(string message)
21 | {
22 | throw new NotImplementedException();
23 | }
24 |
25 | public IDisposable OpenMappedContext(string key, string value)
26 | {
27 | throw new NotImplementedException();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoringWindowsService/ManagementAndMonitoringWindowsService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net452
5 | full
6 | Exe
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/help/fti/FTI_119.json:
--------------------------------------------------------------------------------
1 | {"warn":[458756,16121858,19791875,34275329,35323909,41222149,61341698],"writeonly":[3014657,46333953],"work":[3473411,8454145,30932994,33751044,34144261,35127297,35782657,45219842,47841281,54984705],"wrap":[3473409,46661633],"want":[3473412,3670017,4915201,7602177,14680065,17301505,18481153,23199745,25690113,34144257,35127300,35782657,39649281,42074113,44630017,46399489,48627713,49545217,52035585],"wolfenden":[3473409,35127297],"way":[3473410,4194305,29425665,31129601,54001665],"warnexception":[4259844,16121857,61341697],"waits":[5177345,41877505,68222977],"wire":[8323073,41484289,42926081,50528257,51380225,58982401,61407233,64946177],"withes":[8585217,10682369,63832065],"widening":[10420225,18350082,22151170,24444929,34734081,45350913],"wants":[13238273,33292289,56557569],"warnformat":[16121857,30212100,61341697],"waiting":[20905985,36306945],"waited":[27590657,32702465],"wait":[29163522,50135042,51773441,59703297],"windows":[34144257,35782657,61538305],"written":[60686337]}
--------------------------------------------------------------------------------
/help/fti/FTI_120.json:
--------------------------------------------------------------------------------
1 | {"xml":[1245186,4784130,5636099,7340034,10551298,11796482,17629186,19070978,19922947,20381698,21495810,27656194,29163522,29949954,33357826,40239107,41549826,44695554,45481986,46858242,56426498,58654722,64094210],"xmlreader":[1245185,4784129,7340033,10551297,11796481,17629185,19070977,20381697,21495809,27656193,29163521,29949953,33357825,41549825,44695553,45481985,46858241,56426497,58654721,64094209],"xmlwriter":[1245185,4784129,7340033,10551297,11796481,17629185,19070977,20381697,21495809,27656193,29163521,29949953,33357825,41549825,44695553,45481985,46858241,56426497,58654721,64094209],"xmlelementattribute":[1441795,2359299,26607619,36569091,42008579,45940739,55508995,63438851],"xmlrequestbuilder":[5636098,13172738,19922947,40239107,49152007],"xmlrootattribute":[5767171,7077891,8192003,13631491,14155779,19398659,24510467,31916035,47316995,47382531,54722563,65994755],"xmlresultparser":[5832707,13172737,23134211,25231362,48103430],"xxxx":[15925249],"xmltextattribute":[38797315]}
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/Mappers/DocumentUpdatedEventMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using DocumentsAndFolders.Sqs.Core.Ports.Events;
2 | using Newtonsoft.Json;
3 | using Paramore.Brighter;
4 |
5 | namespace DocumentsAndFolders.Sqs.Core.Ports.Mappers
6 | {
7 | public class DocumentUpdatedEventMessageMapper : IAmAMessageMapper
8 | {
9 | public Message MapToMessage(DocumentUpdatedEvent request)
10 | {
11 | var header = new MessageHeader(messageId: request.Id, topic: "DocumentUpdatedEvent", messageType: MessageType.MT_EVENT);
12 | var body = new MessageBody(JsonConvert.SerializeObject(request));
13 | var message = new Message(header, body);
14 | return message;
15 | }
16 |
17 | public DocumentUpdatedEvent MapToRequest(Message message)
18 | {
19 | return JsonConvert.DeserializeObject(message.Body.Value);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/IAmAMessageStoreViewerAsync.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 |
5 | namespace Paramore.Brighter
6 | {
7 | ///
8 | /// Inteface IAmAMessageStoreViewerAsync{T}
9 | /// Used to retrieve messages from an
10 | ///
11 | ///
12 | public interface IAmAMessageStoreViewerAsync where T : Message
13 | {
14 | ///
15 | /// Returns all messages in the store
16 | ///
17 | /// Number of messages to return in search results (default = 100)
18 | /// Page number of results to return (default = 1)
19 | ///
20 | Task> GetAsync(int pageSize = 100, int pageNumber = 1, CancellationToken cancellationToken = default(CancellationToken));
21 |
22 | }
23 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyCommandHandlerAsync.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 |
6 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
7 | {
8 | internal class MyCommandHandlerAsync : RequestHandlerAsync
9 | {
10 | private readonly IDictionary _receivedMessages;
11 |
12 | public MyCommandHandlerAsync(IDictionary receivedMessages)
13 | {
14 | _receivedMessages = receivedMessages;
15 | }
16 |
17 | public override async Task HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
18 | {
19 | _receivedMessages.Add(nameof(MyCommandHandlerAsync), command.Id);
20 | return await base.HandleAsync(command, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.RESTMS/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/TinyIoCAsyncHandlerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using HelloAsyncListeners.TinyIoc;
3 | using Paramore.Brighter;
4 |
5 | namespace HelloAsyncListeners
6 | {
7 | internal class TinyIocHandlerFactory : IAmAHandlerFactoryAsync
8 | {
9 | private readonly TinyIoCContainer _container;
10 |
11 | public TinyIocHandlerFactory(TinyIoCContainer container)
12 | {
13 | _container = container;
14 | }
15 |
16 | public void Release(IHandleRequestsAsync handler)
17 | {
18 | // ReSharper disable once SuspiciousTypeConversion.Global
19 | var disposable = handler as IDisposable;
20 | if (disposable != null)
21 | {
22 | disposable.Dispose();
23 | }
24 | }
25 |
26 | IHandleRequestsAsync IAmAHandlerFactoryAsync.Create(Type handlerType)
27 | {
28 | return (IHandleRequestsAsync)_container.Resolve(handlerType);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/Ports/Commands/HeartbeatReply.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Paramore.Brighter.ServiceActivator.Ports.Commands
4 | {
5 | public class HeartbeatReply : Reply
6 | {
7 | public HeartbeatReply(string hostName, ReplyAddress sendersAddress)
8 | :base(sendersAddress)
9 | {
10 | HostName = hostName;
11 | Consumers = new List();
12 | }
13 |
14 | public string HostName { get; private set; }
15 | public IList Consumers { get; private set; }
16 | }
17 |
18 | public class RunningConsumer
19 | {
20 | public RunningConsumer(ConnectionName connectionName, ConsumerState state)
21 | {
22 | ConnectionName = connectionName;
23 | State = state;
24 | }
25 |
26 | public ConnectionName ConnectionName { get; private set; }
27 | public ConsumerState State { get; private set; }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.WindowsService/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/CommandHandlers/FolderCreatedEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DocumentsAndFolders.Sqs.Core.Ports.DB;
3 | using DocumentsAndFolders.Sqs.Core.Ports.Events;
4 | using Paramore.Brighter;
5 |
6 | namespace DocumentsAndFolders.Sqs.Core.Ports.CommandHandlers
7 | {
8 | public class FolderCreatedEventHandler : RequestHandler
9 | {
10 | public override FolderCreatedEvent Handle(FolderCreatedEvent @event)
11 | {
12 | Console.WriteLine("Received FolderCreatedEvent");
13 | Console.WriteLine("----------------------------------");
14 | Console.WriteLine("FolderId: {0}, Title: {1}", @event.FolderId, @event.Title);
15 | Console.WriteLine("----------------------------------");
16 | Console.WriteLine("Message Ends");
17 |
18 |
19 | FakeDB.Instance.AddUpdateFolder(new Folder(@event.FolderId, @event.Title));
20 |
21 | return base.Handle(@event);
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessageStore.MsSql/DDL Scripts/MSSQL/MessageStore.sql:
--------------------------------------------------------------------------------
1 | -- User Table information:
2 | -- Number of tables: 1
3 | -- Messages: 0 row(s)
4 |
5 | PRINT 'Creating Messages table';
6 | CREATE TABLE [Messages]
7 | (
8 | [Id] [BIGINT] NOT NULL IDENTITY ,
9 | [MessageId] UNIQUEIDENTIFIER NOT NULL ,
10 | [Topic] NVARCHAR(255) NULL ,
11 | [MessageType] NVARCHAR(32) NULL ,
12 | [Timestamp] DATETIME NULL ,
13 | [HeaderBag] NTEXT NULL ,
14 | [Body] NTEXT NULL ,
15 | PRIMARY KEY ( [Id] )
16 | );
17 | GO
18 | IF ( NOT EXISTS ( SELECT *
19 | FROM sys.indexes
20 | WHERE name = 'UQ_Messages__MessageId'
21 | AND object_id = OBJECT_ID('Messages') )
22 | )
23 | BEGIN
24 | PRINT 'Creating a unique index on the MessageId column of the Messages table...';
25 |
26 | CREATE UNIQUE NONCLUSTERED INDEX UQ_Messages__MessageId
27 | ON Messages(MessageId);
28 | END;
29 | GO
30 | PRINT 'Done';
--------------------------------------------------------------------------------
/samples/GreetingsWindowsService/GreetingsWindowsService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net452
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/HelloWorld/HelloWorld.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/Ports/ConfigurationCommandMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Reflection;
3 | using Newtonsoft.Json;
4 | using Paramore.Brighter.ServiceActivator.Ports.Commands;
5 |
6 | namespace Paramore.Brighter.ServiceActivator.Ports
7 | {
8 | public class ConfigurationCommandMessageMapper : IAmAMessageMapper
9 | {
10 | public Message MapToMessage(ConfigurationCommand request)
11 | {
12 | var topic = Environment.MachineName + Assembly.GetEntryAssembly().GetName();
13 |
14 | var header = new MessageHeader(messageId: request.Id, topic: topic, messageType: MessageType.MT_COMMAND);
15 | var body = new MessageBody(JsonConvert.SerializeObject(request));
16 | var message = new Message(header, body);
17 | return message;
18 | }
19 |
20 | public ConfigurationCommand MapToRequest(Message message)
21 | {
22 | return JsonConvert.DeserializeObject(message.Body.Value);
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/HelloWorldAsync/HelloWorldAsync.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/HelloAsyncListeners.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.AWSSQS/MessageDefaultContractResolver.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Newtonsoft.Json;
3 | using Newtonsoft.Json.Serialization;
4 |
5 | namespace Paramore.Brighter.MessagingGateway.AWSSQS
6 | {
7 | ///
8 | /// This class is used to deserialize an SQS message to Message class with it's readonly properties
9 | ///
10 | public class MessageDefaultContractResolver : DefaultContractResolver
11 | {
12 | protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
13 | {
14 | var prop = base.CreateProperty(member, memberSerialization);
15 |
16 | if (!prop.Writable)
17 | {
18 | var property = member as PropertyInfo;
19 | if (property != null)
20 | {
21 | var hasPrivateSetter = property.GetSetMethod(true) != null;
22 | prop.Writable = hasPrivateSetter;
23 | }
24 | }
25 |
26 | return prop;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/ControlBus/When_creating_a_control_bus_sender.cs:
--------------------------------------------------------------------------------
1 | using FakeItEasy;
2 | using FluentAssertions;
3 | using Xunit;
4 |
5 | namespace Paramore.Brighter.Tests.ControlBus
6 | {
7 | public class ControlBusSenderFactoryTests
8 | {
9 | private IAmAControlBusSender s_sender;
10 | private readonly IAmAControlBusSenderFactory s_senderFactory;
11 | private readonly IAmAMessageStore s_fakeMessageStore;
12 | private readonly IAmAMessageProducer s_fakeGateway;
13 |
14 | public ControlBusSenderFactoryTests()
15 | {
16 | s_fakeMessageStore = A.Fake>();
17 | s_fakeGateway = A.Fake();
18 |
19 | s_senderFactory = new ControlBusSenderFactory();
20 | }
21 |
22 | [Fact]
23 | public void When_creating_a_control_bus_sender()
24 | {
25 | s_sender = s_senderFactory.Create(s_fakeMessageStore, s_fakeGateway);
26 |
27 | //_should_create_a_control_bus_sender
28 | s_sender.Should().NotBeNull();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter/Reply.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter
4 | {
5 | ///
6 | /// Class Reply.
7 | /// Used for a Command that is a Reply in a Request-Reply exchange. Brighter supports publish-subscribe as its main approach to producers and consumers, but it is possible
8 | /// to support request-reply semantics as well. The key is that the sender must include a in the (the
9 | /// then populates that into the as the replyTo address). When we create a then we set the from the
10 | /// onto the and the for the sets this as the topic so that it is routed correctly.
11 | ///
12 | public class Reply : Command
13 | {
14 | public ReplyAddress SendersAddress { get; private set; }
15 |
16 | public Reply(ReplyAddress sendersAddress)
17 | : base(Guid.NewGuid())
18 | {
19 | SendersAddress = sendersAddress;
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/help/scripts/SplitScreen.js:
--------------------------------------------------------------------------------
1 |
2 | function SplitScreen (nonScrollingRegionId, scrollingRegionId) {
3 |
4 | // store references to the two regions
5 | this.nonScrollingRegion = document.getElementById(nonScrollingRegionId);
6 | this.scrollingRegion = document.getElementById(scrollingRegionId);
7 |
8 | // set the scrolling settings
9 | this.scrollingRegion.parentElement.style.margin = "0px";
10 | this.scrollingRegion.parentElement.style.overflow = "hidden";
11 | this.scrollingRegion.style.overflow = "auto";
12 |
13 | // fix the size of the scrolling region
14 | this.resize(null);
15 |
16 | // add an event handler to resize the scrolling region when the window is resized
17 | registerEventHandler(window, 'resize', getInstanceDelegate(this, "resize"));
18 |
19 | // Added by ComponentOne
20 | this.resize(null);
21 | }
22 |
23 | SplitScreen.prototype.resize = function(e) {
24 | var height = document.body.clientHeight - this.nonScrollingRegion.offsetHeight;
25 | if (height > 0) {
26 | this.scrollingRegion.style.height = height;
27 | } else {
28 | this.scrollingRegion.style.height = 0;
29 | }
30 | this.scrollingRegion.style.width = this.scrollingRegion.parentElement.clientWidth;
31 | }
32 |
--------------------------------------------------------------------------------
/samples/EventSourcing/EventSourcing.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/help/fti/FTI_113.json:
--------------------------------------------------------------------------------
1 | {"queue":[2031618,3145729,3276802,3473429,4194306,5177345,6029313,6488065,6881281,7143425,8454145,9699330,10551297,14352385,14811137,18153473,18808833,19202049,19333121,20447234,20971522,23724033,24182785,25100290,25493505,26279937,28114945,29032449,29884417,30932994,32833537,33751044,34144267,35127297,35717121,35782660,40173569,40435715,40828929,41877505,43515905,43778050,44957697,45023233,45219842,45547521,46071809,47841281,51511297,52101121,52559873,54001666,54984705,55443457,59572226,60817409,61407236,61538307,61800450,61931521,62193665,64225281,64880641,64946180,65273857,65536002,68222977],"queues":[2686977,3407874,3473411,10551300,13238274,16449538,17039361,21168135,28770305,30343169,31522817,33292292,33357827,33423361,35127299,49479682,55443459,56557572,58458114,60162057,61931524,64094209],"quit":[3342337,3473409,20774913,38993921,43515905,56229889,59113473],"quality":[3473412,4194305,10747905,13303809,30343169,33292289,35127297,47906817,53542913,54001665,56557569,60882945],"qos":[3473412,4194305,13238273,17039361,25296897,33292290,35127298,37289985,42336257,54001665,56557570],"qosprefetchsize":[10551297,16449540,61931521],"queued":[17694721,27590657],"query":[23199745,31653889,39649281],"queuename":[25100292,32833540,40173572,46071812,59572228]}
--------------------------------------------------------------------------------
/samples/GenericListener/Ports/Events/EventStoredEvent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter;
3 |
4 | namespace GenericListener.Ports.Events
5 | {
6 | public class EventStoredEvent : IRequest
7 | {
8 | ///
9 | /// EventStore requireds a Guid for each event written.
10 | ///
11 | public Guid Id { get; set; }
12 |
13 | ///
14 | /// Commonly used to imply or construct the stream name (e.g. Tasks).
15 | ///
16 | public string Context { get; set; }
17 |
18 | ///
19 | /// Commonly used for category-based stream names (e.g. Tasks-20).
20 | ///
21 | public string CategoryId { get; set; }
22 |
23 | ///
24 | /// The EventStoreWriter will not serialize any byte[] fields
25 | /// and assume they are already JSON ready for encoding.
26 | ///
27 | public byte[] JsonData { get; set; }
28 |
29 | ///
30 | /// MetaData to write with the event. As this is an object it will
31 | /// be serialized it into JSON before encoding.
32 | ///
33 | public object MetaData { get; set; }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/Monitoring/Mappers/MonitorEventMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using Newtonsoft.Json;
2 | using Paramore.Brighter.Monitoring.Events;
3 |
4 | namespace Paramore.Brighter.Monitoring.Mappers
5 | {
6 | public class MonitorEventMessageMapper : IAmAMessageMapper
7 | {
8 | ///
9 | /// Maps to message.
10 | ///
11 | /// The request.
12 | /// Message.
13 | public Message MapToMessage(MonitorEvent request)
14 | {
15 | var header = new MessageHeader(messageId: request.Id, topic: "paramore.monitoring.event", messageType: MessageType.MT_COMMAND);
16 | var body = new MessageBody(JsonConvert.SerializeObject(request));
17 | var message = new Message(header, body);
18 | return message;
19 | }
20 |
21 | ///
22 | /// Maps to request.
23 | ///
24 | /// The message.
25 | /// TRequest.
26 | public MonitorEvent MapToRequest(Message message)
27 | {
28 | return JsonConvert.DeserializeObject(message.Body.Value);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/help/Web.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/Logging/TestDoubles/SpyLog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Paramore.Brighter.Logging;
4 |
5 | namespace Paramore.Brighter.Tests.Logging.TestDoubles
6 | {
7 | internal class SpyLog : ILog
8 | {
9 | public IList Logs { get; } = new List();
10 |
11 | public bool Log(LogLevel logLevel, Func messageFunc, Exception exception = null, params object[] formatParameters)
12 | {
13 | //if we are checking if level is supported
14 | if (messageFunc == null)
15 | return true;
16 |
17 | Logs.Add(new LogRecord(logLevel, string.Format(messageFunc(), formatParameters), exception));
18 |
19 | return true;
20 | }
21 |
22 | internal class LogRecord
23 | {
24 | public LogRecord(LogLevel logLevel, string message, Exception exception)
25 | {
26 | LogLevel = logLevel;
27 | Message = message;
28 | Exception = exception;
29 | }
30 |
31 | public LogLevel LogLevel { get; }
32 | public string Message { get; }
33 | public Exception Exception { get; }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/samples/GreetingsWindowsService/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Topshelf;
6 |
7 | namespace GreetingsWindowsService
8 | {
9 | public class Program
10 | {
11 | public static void Main(string[] args)
12 | { /*
13 | * Send a message in this format to this service and it will print it out
14 | * We document this here so that you can simply paste this into the RMQ web portal
15 | * to see commands flowing through the system.
16 | * {"Greeting":"hello world","Id":"0a81cbbc-5f82-4912-99ee-19f0b7ee4bc8"}
17 | */
18 |
19 | HostFactory.Run(x => x.Service(sc =>
20 | {
21 | sc.ConstructUsing(() => new GreetingService());
22 |
23 | // the start and stop methods for the service
24 | sc.WhenStarted((s, hostcontrol) => s.Start(hostcontrol));
25 | sc.WhenStopped((s, hostcontrol) => s.Stop(hostcontrol));
26 |
27 | // optional, when shutdown is supported
28 | sc.WhenShutdown((s, hostcontrol) => s.Shutdown(hostcontrol));
29 | }));
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/IAmAConsumer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 |
4 | namespace Paramore.Brighter.ServiceActivator
5 | {
6 | public interface IAmAConsumer : IDisposable
7 | {
8 | ///
9 | /// Gets or sets the name.
10 | ///
11 | /// The name.
12 | ConnectionName Name { get; set; }
13 |
14 | ///
15 | /// Gets the performer.
16 | ///
17 | /// The performer.
18 | IAmAPerformer Performer { get; }
19 |
20 | ///
21 | /// Gets or sets the state.
22 | ///
23 | /// The state.
24 | ConsumerState State { get; set; }
25 |
26 | ///
27 | /// Gets or sets the job.
28 | ///
29 | /// The job.
30 | Task Job { get; set; }
31 |
32 | int JobId { get; set; }
33 |
34 | ///
35 | /// Opens the task queue and begin receiving messages.
36 | ///
37 | void Open();
38 |
39 | ///
40 | /// Shuts the task, which will not receive messages.
41 | ///
42 | void Shut();
43 | }
44 | }
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/WantToBeGreetedToo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 | using Paramore.Brighter;
5 |
6 | namespace HelloAsyncListeners
7 | {
8 | public class WantToBeGreetedToo : RequestHandlerAsync
9 | {
10 | public override async Task HandleAsync(GreetingEvent @event, CancellationToken cancellationToken = default(CancellationToken))
11 | {
12 | var api = new IpFyApi(new Uri("https://api.ipify.org"));
13 | var result = await api.GetAsync(cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
14 |
15 | // Simulated exceptions
16 | if (@event.Name.ToLower().Equals("devil"))
17 | {
18 | throw new ArgumentException("Devil's greeting will not be handled by Want-to-be-greeted-too.");
19 | }
20 |
21 | Console.WriteLine("Want-to-be-greeted-too received hello from {0}", @event.Name);
22 | Console.WriteLine(result.Success ? "Want-to-be-greeted-too has public IP addres is {0}" : "Call to IpFy API failed : {0}",
23 | result.Message);
24 |
25 | return await base.HandleAsync(@event, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/MessageDispatch/TestDoubles/FailingEventMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.Tests.MessageDispatch.TestDoubles
4 | {
5 | internal class FailingEventMessageMapper : IAmAMessageMapper
6 | {
7 | public Message MapToMessage(MyFailingMapperEvent request)
8 | {
9 | throw new NotImplementedException();
10 | }
11 |
12 | public MyFailingMapperEvent MapToRequest(Message message)
13 | {
14 | throw new Exception();
15 | //return JsonConvert.DeserializeObject(message.Body.Value);
16 | }
17 | }
18 |
19 | internal class MyFailingMapperEvent : IRequest
20 | {
21 | ///
22 | /// Gets or sets the identifier.
23 | ///
24 | /// The identifier.
25 | public Guid Id { get; set; }
26 | public string MissingStringField { get; set; }
27 | public int MissingIntField { get; set; }
28 |
29 | ///
30 | /// Initializes a new instance of the class.
31 | ///
32 | public MyFailingMapperEvent()
33 | {
34 | Id = new Guid();
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/DB/FakeDatabase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace DocumentsAndFolders.Sqs.Core.Ports.DB
5 | {
6 | public sealed class FakeDB
7 | {
8 | private static readonly Lazy lazy =
9 | new Lazy(() => new FakeDB());
10 |
11 | public static FakeDB Instance { get { return lazy.Value; } }
12 |
13 | private FakeDB()
14 | {
15 | Documents = new Dictionary();
16 | Folders = new Dictionary();
17 | }
18 |
19 | public Dictionary Folders { get; set; }
20 |
21 | public Dictionary Documents { get; private set; }
22 |
23 | public Document GetDocument(int id)
24 | {
25 | return Documents.ContainsKey(id) ? Documents[id] : null;
26 | }
27 |
28 | public Folder GetFolder(int id)
29 | {
30 | return Folders.ContainsKey(id) ? Folders[id] : null;
31 | }
32 |
33 | public void AddUpdateDocument(Document document)
34 | {
35 | Documents[document.DocumentId] = document;
36 | }
37 |
38 | public void AddUpdateFolder(Folder folder)
39 | {
40 | Folders[folder.FolderId] = folder;
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/ControlBus/When_receiving_a_stop_message_for_a_connection.cs:
--------------------------------------------------------------------------------
1 | using FakeItEasy;
2 | using Xunit;
3 | using Paramore.Brighter.ServiceActivator;
4 | using Paramore.Brighter.ServiceActivator.Ports.Commands;
5 | using Paramore.Brighter.ServiceActivator.Ports.Handlers;
6 |
7 | namespace Paramore.Brighter.Tests.ControlBus
8 | {
9 | public class ConfigurationCommandStopTests
10 | {
11 | const string CONNECTION_NAME = "Test";
12 | private readonly ConfigurationCommandHandler _configurationCommandHandler;
13 | private readonly ConfigurationCommand _configurationCommand;
14 | private readonly IDispatcher _dispatcher;
15 |
16 | public ConfigurationCommandStopTests()
17 | {
18 | _dispatcher = A.Fake();
19 | _configurationCommandHandler = new ConfigurationCommandHandler(_dispatcher);
20 | _configurationCommand = new ConfigurationCommand(ConfigurationCommandType.CM_STOPCHANNEL) {ConnectionName = CONNECTION_NAME};
21 | }
22 |
23 | [Fact]
24 | public void When_receiving_a_stop_message_for_a_connection()
25 | {
26 | _configurationCommandHandler.Handle(_configurationCommand);
27 |
28 | //_should_call_stop_for_the_given_connection
29 | A.CallTo(() => _dispatcher.Shut(CONNECTION_NAME));
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/samples/GenericListener/Infrastructure/MessageMapperFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter;
3 | using TinyIoc;
4 |
5 | namespace GenericListener.Infrastructure
6 | {
7 | public class MessageMapperFactory : IAmAMessageMapperFactory, IAmAMessageMapperRegistry
8 | {
9 | readonly TinyIoCContainer _container;
10 |
11 | public MessageMapperFactory(TinyIoCContainer windsorContainer)
12 | {
13 | _container = windsorContainer;
14 | }
15 |
16 | public IAmAMessageMapper Create(Type messageMapperType)
17 | {
18 | return (IAmAMessageMapper)_container.Resolve(messageMapperType);
19 | }
20 |
21 | public IAmAMessageMapper Get() where T : class, IRequest
22 | {
23 | return _container.Resolve>();
24 | }
25 |
26 | public void Register()
27 | where TRequest : class, IRequest
28 | where TMessageMapper : class, IAmAMessageMapper
29 | {
30 | _container.Register, TMessageMapper>().AsMultiInstance();
31 | }
32 |
33 | public void Register(Type requestType, Type messageMapper)
34 | {
35 | _container.Register(typeof(IAmAMessageMapper<>).MakeGenericType(requestType), messageMapper);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoringCoreConsole/ManagementAndMonitoringCoreConsole.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/IConsumerFactory.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.ServiceActivator
26 | {
27 | internal interface IConsumerFactory
28 | {
29 | Consumer Create();
30 | Consumer CreateAsync();
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/PostBackItem.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 |
3 | namespace Paramore.Brighter
4 | {
5 | ///
6 | /// Used with the this class stores the callback to be executed on completion
7 | /// of an asynchronous task (either via ContinueWith or use of async..await). We use it so that the message pump can provide
8 | /// a single threaded apartment, ensuring that the callback is always on the same thread. This is useful as it allows us
9 | /// to ensure that the pipeline for a message is guaranteed not to have concurrency concerns.
10 | ///
11 | public class PostBackItem
12 | {
13 | private readonly SendOrPostCallback _sendOrPostCallback;
14 | private readonly object _postbackState;
15 |
16 | ///
17 | /// Creates an instance of PostBackItem
18 | ///
19 | /// The callback delegate
20 | /// The arguments to pass to
21 | public PostBackItem(SendOrPostCallback sendOrPostCallback, object postbackState)
22 | {
23 | _sendOrPostCallback = sendOrPostCallback;
24 | _postbackState = postbackState;
25 | }
26 |
27 |
28 | public void Call()
29 | {
30 | _sendOrPostCallback(_postbackState);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter/Request.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter
4 | {
5 | ///
6 | /// Class Request.
7 | /// Used for a Command that is a Reply in a Request-Reply exchange. Brighter supports publish-subscribe as its main approach to producers and consumers, but it is possible
8 | /// to support request-reply semantics as well. The key is that the sender must include a in the (the
9 | /// then populates that into the as the replyTo address). When we create a then we set the from the
10 | /// onto the and the for the sets this as the topic so that it is routed correctly.
11 | ///
12 | public class Request : Command
13 | {
14 | ///
15 | /// The address of the queue to reply to - usually private to the sender
16 | ///
17 | public ReplyAddress ReplyAddress { get; private set; }
18 |
19 | ///
20 | /// Constucts a reply
21 | ///
22 | ///
23 | public Request(ReplyAddress replyAddress)
24 | : base(Guid.NewGuid())
25 | {
26 | ReplyAddress = replyAddress;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/IAmAnAggregate.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
26 | {
27 | public interface IAmAnAggregate
28 | {
29 | int ID { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyAggregate.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
26 | {
27 | internal class MyAggregate : IAmAnAggregate
28 | {
29 | public int ID { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/help/FillNode.php:
--------------------------------------------------------------------------------
1 |
2 | // Contributed to the Sandcastle Help File Builder project by Thomas Levesque
3 |
4 | // header("Content-Type: text/html; charset=utf-8");
5 | $toc = new DOMDocument();
6 | $toc->load('WebTOC.xml');
7 | $xpath = new DOMXPath($toc);
8 | $id = $_GET["Id"];
9 | $nodes = $xpath->query("//HelpTOCNode[@Id='$id']/*");
10 | if ($nodes->length == 0)
11 | {
12 | ?>
13 | TOC node not found!
14 |
15 | die();
16 | }
17 | foreach($nodes as $node)
18 | {
19 | $id = $node->getAttribute("Id");
20 | $url = $node->getAttribute("Url");
21 | $title = $node->getAttribute("Title");
22 | if (empty($url))
23 | {
24 | $url = "#";
25 | $target = "";
26 | }
27 | else
28 | {
29 | $target = " target=\"TopicContent\"";
30 | }
31 |
32 | if ($node->hasChildNodes())
33 | {
34 | ?>
35 |
40 |
41 | }
42 | else
43 | {
44 | ?>
45 |
49 |
50 | }
51 | }
52 | ?>
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/Ports/Mappers/HeartbeatRequestCommandMessageMapper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Newtonsoft.Json.Linq;
3 | using Paramore.Brighter.ServiceActivator.Ports.Commands;
4 |
5 | namespace Paramore.Brighter.ServiceActivator.Ports.Mappers
6 | {
7 | public class HeartbeatRequestCommandMessageMapper : IAmAMessageMapper
8 | {
9 | public Message MapToMessage(HeartbeatRequest request)
10 | {
11 | var header = new MessageHeader(
12 | messageId: request.Id,
13 | topic: "Heartbeat",
14 | messageType: MessageType.MT_COMMAND,
15 | correlationId: request.ReplyAddress.CorrelationId,
16 | replyTo: request.ReplyAddress.Topic);
17 |
18 | var json = new JObject(new JProperty("Id", request.Id));
19 | var body = new MessageBody(json.ToString());
20 | var message = new Message(header, body);
21 | return message;
22 |
23 | }
24 |
25 | public HeartbeatRequest MapToRequest(Message message)
26 | {
27 | var replyAddress = new ReplyAddress(topic: message.Header.ReplyTo, correlationId: message.Header.CorrelationId);
28 | var request = new HeartbeatRequest(replyAddress);
29 | var messageBody = JObject.Parse(message.Body.Value);
30 | request.Id = Guid.Parse((string) messageBody["Id"]);
31 | return request;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/WantToBeGreeted.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 | using Paramore.Brighter;
5 |
6 | namespace HelloAsyncListeners
7 | {
8 | public class WantToBeGreeted : RequestHandlerAsync
9 | {
10 | public override async Task HandleAsync(GreetingEvent @event, CancellationToken cancellationToken = default(CancellationToken))
11 | {
12 | // Simulated exceptions
13 | if (@event.Name.ToLower().Equals("roger"))
14 | {
15 | throw new ArgumentException("Roger's greeting will not be handled by Want-to-be-greeted.");
16 | }
17 | if (@event.Name.ToLower().Equals("devil"))
18 | {
19 | throw new ArgumentException("Devil's greeting will not be handled by Want-to-be-greeted.");
20 | }
21 |
22 | var api = new IpFyApi(new Uri("https://api.ipify.org"));
23 | var result = await api.GetAsync(cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
24 |
25 | Console.WriteLine("Want-to-be-greeted received hello from {0}", @event.Name);
26 | Console.WriteLine(result.Success ? "Want-to-be-greeted has public IP addres is {0}" : "Call to IpFy API failed : {0}",
27 | result.Message);
28 |
29 | return await base.HandleAsync(@event, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": ".NET Core Launch (web)",
6 | "type": "coreclr",
7 | "request": "launch",
8 | "preLaunchTask": "build",
9 | "program": "${workspaceRoot}\\Paramore.Brighter.messageviewer.console\\bin\\Debug\\netcoreapp1.0\\Paramore.Brighter.messageviewer.console.dll",
10 | "args": [],
11 | "cwd": "${workspaceRoot}",
12 | "stopAtEntry": false,
13 | "internalConsoleOptions": "openOnSessionStart",
14 | "launchBrowser": {
15 | "enabled": true,
16 | "args": "${auto-detect-url}",
17 | "windows": {
18 | "command": "cmd.exe",
19 | "args": "/C start ${auto-detect-url}"
20 | },
21 | "osx": {
22 | "command": "open"
23 | },
24 | "linux": {
25 | "command": "xdg-open"
26 | }
27 | },
28 | "env": {
29 | "ASPNETCORE_ENVIRONMENT": "Development"
30 | },
31 | "sourceFileMap": {
32 | "/Views": "${workspaceRoot}/Views"
33 | }
34 | },
35 | {
36 | "name": ".NET Core Attach",
37 | "type": "coreclr",
38 | "request": "attach",
39 | "processId": "${command.pickProcess}"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/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("HelloAsyncListeners")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("HelloAsyncListeners")]
12 | [assembly: AssemblyCopyright("Copyright © 2016")]
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("ca8a646b-8136-4aa6-b5ad-95f341f24605")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/samples/GenericListener/Adapters/EventStore/EventStoreLogger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using EventStore.ClientAPI;
3 | using log4net;
4 |
5 | namespace GenericListener.Adapters.EventStore
6 | {
7 | public class EventStoreLogger : ILogger
8 | {
9 | private static readonly ILog _logger = LogManager.GetLogger(typeof(EventStoreLogger));
10 |
11 | public void Error(string format, params object[] args)
12 | {
13 | _logger.Error(FlattenMessage(format,args));
14 | }
15 |
16 | public void Error(Exception ex, string format, params object[] args)
17 | {
18 | _logger.Error(FlattenMessage(format,args));
19 | }
20 |
21 | public void Info(string format, params object[] args)
22 | {
23 | _logger.Info(FlattenMessage(format,args));
24 | }
25 |
26 | public void Info(Exception ex, string format, params object[] args)
27 | {
28 | _logger.Info(FlattenMessage(format,args));
29 | }
30 |
31 | public void Debug(string format, params object[] args)
32 | {
33 | _logger.Debug(FlattenMessage(format,args));
34 | }
35 |
36 | public void Debug(Exception ex, string format, params object[] args)
37 | {
38 | _logger.Debug(FlattenMessage(format,args));
39 | }
40 |
41 | private static string FlattenMessage(string format, params object[] args)
42 | {
43 | return args.Length > 0 ? string.Format(format,args) : format;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/samples/HelloAsyncListeners/IpFyApi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net.Http;
3 | using System.Threading;
4 | using System.Threading.Tasks;
5 |
6 | namespace HelloAsyncListeners
7 | {
8 | internal struct IpFyApiResult
9 | {
10 | public IpFyApiResult(bool success, string message)
11 | : this()
12 | {
13 | Success = success;
14 | Message = message;
15 | }
16 |
17 | public bool Success { get; private set; }
18 | public string Message { get; private set; }
19 | }
20 |
21 | internal class IpFyApi
22 | {
23 | private readonly Uri _endpoint;
24 |
25 | public IpFyApi(Uri endpoint)
26 | {
27 | _endpoint = endpoint;
28 | }
29 |
30 | public async Task GetAsync(CancellationToken cancellationToken = default(CancellationToken))
31 | {
32 | using (var client = new HttpClient())
33 | {
34 | client.BaseAddress = _endpoint;
35 | client.DefaultRequestHeaders.Clear();
36 |
37 | var response = await client.GetAsync("", cancellationToken);
38 | string result;
39 | if (response.IsSuccessStatusCode)
40 | result = await response.Content.ReadAsStringAsync();
41 | else
42 | result = "API returned HTTP status " + response.StatusCode;
43 | return new IpFyApiResult(response.IsSuccessStatusCode, result);
44 | }
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter/ICommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter
26 | {
27 | ///
28 | /// Interface ICommand
29 | /// A command is an imperative instruction to do something. We expect only one receiver of a command because it is point-to-point
30 | ///
31 | public interface ICommand : IRequest
32 | {
33 | }
34 | }
--------------------------------------------------------------------------------
/samples/EventSourcing/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("EventSourcing")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("EventSourcing")]
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("7c9b48f6-1f6b-452f-a3c0-ef63abf494fd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/GenericListener/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("GenericListener")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("GenericListener")]
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("a90b1c4c-3910-4d60-9d0c-bb23078f5e6b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/HelloWorldAsync/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("HelloWorldAsync")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("HelloWorldAsync")]
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("d7d027c1-8c8b-4334-a695-7b0d139b44cd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.AWSSQS/InputChannelFactory.cs:
--------------------------------------------------------------------------------
1 | namespace Paramore.Brighter.MessagingGateway.AWSSQS
2 | {
3 | public class InputChannelFactory : IAmAChannelFactory
4 | {
5 | private readonly SqsMessageConsumerFactory _messageConsumerFactory;
6 | private readonly SqsMessageProducerFactory _messageProducerFactory;
7 |
8 | ///
9 | /// Initializes a new instance of the class.
10 | ///
11 | /// The messageConsumerFactory.
12 | /// The messageProducerFactory.
13 | public InputChannelFactory(SqsMessageConsumerFactory messageConsumerFactory, SqsMessageProducerFactory messageProducerFactory)
14 | {
15 | _messageConsumerFactory = messageConsumerFactory;
16 | _messageProducerFactory = messageProducerFactory;
17 | }
18 |
19 | ///
20 | /// Creates the input channel.
21 | ///
22 | /// Name of the channel.
23 | /// The routing key.
24 | ///
25 | /// IAmAnInputChannel.
26 | public IAmAChannel CreateInputChannel(string channelName, string routingKey, bool isDurable)
27 | {
28 | return new Channel(channelName, _messageConsumerFactory.Create(channelName, routingKey, isDurable));
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/IRepository.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | internal interface IRepository where T : IAmAnAggregate
30 | {
31 | void Add(T aggregate);
32 | T this[Guid id] { get; }
33 | IUnitOfWork UnitOfWork { set; }
34 | }
35 | }
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoring/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("ManagementAndMonitoring")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ManagementAndMonitoring")]
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("badfa403-f219-4e38-b647-3bee9526601d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/code_of_conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Code of Conduct
2 |
3 | As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4 |
5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6 |
7 | Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8 |
9 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10 |
11 | This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
12 |
13 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
14 |
15 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.1.0, available at [http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/)
16 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/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("DocumentsAndFolders.Sqs.Core")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DocumentsAndFolders.Sqs.Core")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
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("db6ba617-87ae-4407-b61b-77e35b45a0ce")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.WindowsService/DocumentsAndFolders.Sqs.WindowsService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net452
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/samples/HelloWorld/GreetingCommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 | using Paramore.Brighter;
27 |
28 | namespace HelloWorld
29 | {
30 | internal class GreetingCommand : Command
31 | {
32 | public GreetingCommand(string name)
33 | :base(new Guid())
34 | {
35 | Name = name;
36 | }
37 |
38 | public string Name { get; private set; }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/samples/HelloWorldAsync/GreetingCommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 | using Paramore.Brighter;
27 |
28 | namespace HelloWorldAsync
29 | {
30 | internal class GreetingCommand : Command
31 | {
32 | public GreetingCommand(string name)
33 | : base(new Guid())
34 | {
35 | Name = name;
36 | }
37 |
38 | public string Name { get; private set; }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.EventsGenerator/DocumentsAndFolders.Sqs.EventsGenerator.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net452
5 | full
6 | Exe
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 | false
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyImplicitHandler.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
26 | {
27 | internal class MyImplicitHandler : RequestHandler
28 | {
29 | [MyLoggingHandler(1)]
30 | public override MyCommand Handle(MyCommand command)
31 | {
32 | return base.Handle(command);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoringCoreConsole/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("ManagementAndMonitoringCoreConsole")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ManagementAndMonitoringCoreConsole")]
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("badfa403-f219-4e38-b647-3bee9526601d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.CommandStore.MsSql/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("Paramore.Brighter.CommandStore.MsSql")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Paramore.Brighter.CommandStore.MsSql")]
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("f8d67d36-7b3f-4cf2-aca3-5e5b05120718")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.WindowsService/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("DocumentsAndFolders.Sqs.WindowsService")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DocumentsAndFolders.Sqs.WindowsService")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
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("db6ba617-87ae-4407-b61b-77e35b45a0ce")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyMixedImplicitHandler.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
26 | {
27 | internal class MyMixedImplicitHandler : RequestHandler
28 | {
29 | [MyLoggingHandlerAsync(1)]
30 | public override MyCommand Handle(MyCommand command)
31 | {
32 | return base.Handle(command);
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.EventsGenerator/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("DocumentsAndFolders.Sqs.EventsGenerator")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DocumentsAndFolders.Sqs.EventsGenerator")]
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("d32baaeb-932c-401b-ba84-c5ce359c3340")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.AWSSQS/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("Paramore.Brighter.MessagingGateway.AWSSQS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Paramore.Brighter.MessagingGateway.AWSSQS")]
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("12421f41-19a8-4717-ae1d-13f8629486bc")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyCommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | internal class MyCommand : ICommand
30 | {
31 | public MyCommand()
32 | {
33 | Id = Guid.NewGuid();
34 | }
35 |
36 | public Guid Id { get; set; }
37 |
38 | public string Value { get; set; }
39 | }
40 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/MessagingGateway/When_requeuing_a_message_with_supported_but_disabled_delay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using FakeItEasy;
4 | using FluentAssertions;
5 | using Xunit;
6 |
7 | namespace Paramore.Brighter.Tests.MessagingGateway
8 | {
9 | public class ChannelRequeueWithDelayTests
10 | {
11 | private readonly IAmAChannel _channel;
12 | private readonly IAmAMessageConsumerSupportingDelay _gateway;
13 | private readonly Message _requeueMessage;
14 | private readonly Stopwatch _stopWatch;
15 |
16 | public ChannelRequeueWithDelayTests()
17 | {
18 | _gateway = A.Fake();
19 | A.CallTo(() => _gateway.DelaySupported).Returns(false);
20 |
21 | _channel = new Channel("test", _gateway);
22 |
23 | _requeueMessage = new Message(
24 | new MessageHeader(Guid.NewGuid(), "key", MessageType.MT_EVENT),
25 | new MessageBody("a test body"));
26 |
27 | _stopWatch = new Stopwatch();
28 | }
29 |
30 | [Fact]
31 | public void When_Requeuing_A_Message_With_Supported_But_Disabled_Delay()
32 | {
33 | _stopWatch.Start();
34 | _channel.Requeue(_requeueMessage, 1000);
35 | _stopWatch.Stop();
36 |
37 | //_should_call_the_messaging_gateway
38 | A.CallTo(() => _gateway.Requeue(_requeueMessage)).MustHaveHappened();
39 | //_should_have_process_delayed_the_call
40 | _stopWatch.ElapsedMilliseconds.Should().BeGreaterThan(900);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.ServiceActivator/Ports/ControlBusHandlerFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Paramore.Brighter.ServiceActivator.Ports.Handlers;
3 |
4 | namespace Paramore.Brighter.ServiceActivator.Ports
5 | {
6 | internal class ControlBusHandlerFactory : IAmAHandlerFactory
7 | {
8 | private readonly Func _commandProcessorFactory;
9 | private readonly IDispatcher _worker;
10 |
11 | public ControlBusHandlerFactory(IDispatcher worker, Func commandProcessorFactory)
12 | {
13 | _worker = worker;
14 | _commandProcessorFactory = commandProcessorFactory;
15 | }
16 |
17 | ///
18 | /// Creates the specified handler type.
19 | ///
20 | /// Type of the handler.
21 | /// IHandleRequests.
22 | public IHandleRequests Create(Type handlerType)
23 | {
24 | if (handlerType == typeof(ConfigurationCommandHandler))
25 | return new ConfigurationCommandHandler(_worker);
26 |
27 | if (handlerType == typeof(HeartbeatRequestCommandHandler))
28 | return new HeartbeatRequestCommandHandler(_commandProcessorFactory(), _worker);
29 |
30 | throw new ArgumentOutOfRangeException(nameof(handlerType));
31 | }
32 |
33 | ///
34 | /// Releases the specified handler.
35 | ///
36 | /// The handler.
37 | public void Release(IHandleRequests handler)
38 | {
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/IUnitOfWork.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System.Collections.Generic;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | internal interface IUnitOfWork
30 | {
31 | void Add(T aggregate);
32 | void Commit();
33 | T Load(int id) where T : IAmAnAggregate;
34 | IEnumerable Query() where T : IAmAnAggregate;
35 | }
36 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/MessagingGateway/awssqs/When_purging_the_queue.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Amazon.Runtime;
3 | using FluentAssertions;
4 | using Paramore.Brighter.MessagingGateway.AWSSQS;
5 | using Xunit;
6 |
7 | namespace Paramore.Brighter.Tests.MessagingGateway.AWSSQS
8 | {
9 | [Trait("Category", "AWS")]
10 | public class SqsMessageConsumerTests
11 | {
12 | private readonly TestAWSQueueListener _testQueueListener;
13 | private readonly IAmAMessageProducer _sender;
14 | private readonly IAmAMessageConsumer _receiver;
15 | private readonly Message _sentMessage;
16 | private readonly string _queueUrl = "https://sqs.eu-west-1.amazonaws.com/027649620536/TestSqsTopicQueue";
17 |
18 | public SqsMessageConsumerTests()
19 | {
20 | var messageHeader = new MessageHeader(Guid.NewGuid(), "TestSqsTopic", MessageType.MT_COMMAND);
21 |
22 | messageHeader.UpdateHandledCount();
23 | _sentMessage = new Message(messageHeader, new MessageBody("test content"));
24 |
25 | var credentials = new AnonymousAWSCredentials();
26 | _sender = new SqsMessageProducer(credentials);
27 | _receiver = new SqsMessageConsumer(credentials, _queueUrl);
28 | _testQueueListener = new TestAWSQueueListener(credentials, _queueUrl);
29 | }
30 |
31 | [Fact]
32 | public void When_purging_the_queue()
33 | {
34 | _sender.Send(_sentMessage);
35 | _receiver.Purge();
36 |
37 | //should_clean_the_queue
38 | _testQueueListener.Listen().Should().BeNull();
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/Actions/DeferMessageAction.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Toby Henderson
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Actions
28 | {
29 | ///
30 | /// Class DeferMessageAction.
31 | /// Used to indicate that a message should be defered.
32 | /// It's purpose is to allow messages received out of order to be delayed until
33 | /// missing messages have been processed
34 | ///
35 | public class DeferMessageAction : Exception
36 | {
37 | }
38 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/IAmAMessageProducerFactory.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Toby Henderson
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter
26 | {
27 | ///
28 | /// Interface IAmAMessageProducerFactory
29 | ///
30 | public interface IAmAMessageProducerFactory
31 | {
32 | ///
33 | /// Creates a message producer.
34 | ///
35 | /// IAmAMessageProducer.
36 | IAmAMessageProducer Create();
37 | }
38 | }
--------------------------------------------------------------------------------
/samples/Greetings/Greetings.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard1.5;net452
5 | full
6 | false
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyAbortingHandler.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | public class MyAbortingHandler : RequestHandler where TRequest : class, IRequest
30 | {
31 | public override TRequest Handle(TRequest command)
32 | {
33 | throw new Exception("Aborting chain");
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyDoubleDecoratedHandler.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
26 | {
27 | internal class MyDoubleDecoratedHandler : RequestHandler
28 | {
29 | [MyValidationHandler(2)]
30 | [MyLoggingHandler(1)]
31 | public override MyCommand Handle(MyCommand command)
32 | {
33 | return base.Handle(command);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/IEvent.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | namespace Paramore.Brighter
26 | {
27 | ///
28 | /// Class Event
29 | /// An event is an indicator to interested parties that 'something has happened'. We expect zero to many receivers as it is one-to-many communication i.e. publish-subscribe
30 | /// An event is usually fire-and-forget, because we do not know it is received.
31 | ///
32 | public interface IEvent : IRequest
33 | {
34 | }
35 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/Ports/CommandHandlers/DocumentUpdatedEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DocumentsAndFolders.Sqs.Core.Ports.DB;
3 | using DocumentsAndFolders.Sqs.Core.Ports.Events;
4 | using Paramore.Brighter;
5 | using Paramore.Brighter.Actions;
6 |
7 | namespace DocumentsAndFolders.Sqs.Core.Ports.CommandHandlers
8 | {
9 | public class DocumentUpdatedEventHandler : RequestHandler
10 | {
11 | public override DocumentUpdatedEvent Handle(DocumentUpdatedEvent @event)
12 | {
13 | Console.WriteLine("Received DocumentUpdatedEvent");
14 | Console.WriteLine("----------------------------------");
15 | Console.WriteLine("DocumentId: {0}, Title: {1}, FolderId: {2}", @event.DocumentId, @event.Title, @event.FolderId);
16 | Console.WriteLine("----------------------------------");
17 | Console.WriteLine("Message Ends");
18 |
19 | if (FakeDB.Instance.GetDocument(@event.DocumentId) == null)
20 | {
21 | Console.WriteLine("Document {0} does not exist. Will requeue", @event.DocumentId);
22 | throw new DeferMessageAction();
23 | }
24 |
25 | if (FakeDB.Instance.GetFolder(@event.FolderId) == null)
26 | {
27 | Console.WriteLine("Folder {0} does not exist for the document {1}. Will requeue", @event.FolderId, @event.DocumentId);
28 | throw new DeferMessageAction();
29 | }
30 |
31 | FakeDB.Instance.AddUpdateDocument(new Document(@event.DocumentId, @event.FolderId, @event.Title));
32 |
33 | return base.Handle(@event);
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/samples/Greetings/Ports/Commands/GreetingEvent.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 | using Paramore.Brighter;
27 |
28 | namespace Greetings.Ports.Commands
29 | {
30 | public class GreetingEvent : Event
31 | {
32 | public GreetingEvent() : base(Guid.NewGuid()) { }
33 |
34 | public GreetingEvent(string greeting) : base(Guid.NewGuid())
35 | {
36 | Greeting = greeting;
37 | }
38 |
39 | public string Greeting { get; set; }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/When_Finding_A_Hander_That_Has_Dependencies.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using FluentAssertions;
3 | using Paramore.Brighter.Tests.CommandProcessors.TestDoubles;
4 |
5 | namespace Paramore.Brighter.Tests.CommandProcessors
6 | {
7 | public class PipelineWithHandlerDependenciesTests
8 | {
9 | private readonly PipelineBuilder _pipelineBuilder;
10 | private IHandleRequests _pipeline;
11 |
12 | public PipelineWithHandlerDependenciesTests()
13 | {
14 | var registry = new SubscriberRegistry();
15 | registry.Register();
16 | var handlerFactory = new TestHandlerFactory(() => new MyDependentCommandHandler(new FakeRepository(new FakeSession())));
17 |
18 | _pipelineBuilder = new PipelineBuilder(registry, handlerFactory);
19 | }
20 |
21 | public void When_Finding_A_Hander_That_Has_Dependencies()
22 | {
23 | _pipeline = _pipelineBuilder.Build(new RequestContext()).First();
24 |
25 | // _should_return_the_command_handler_as_the_implicit_handler
26 | _pipeline.Should().BeOfType();
27 | // _should_be_the_only_element_in_the_chain
28 | TracePipeline().ToString().Should().Be("MyDependentCommandHandler|");
29 | }
30 |
31 | private PipelineTracer TracePipeline()
32 | {
33 | var pipelineTracer = new PipelineTracer();
34 | _pipeline.DescribePath(pipelineTracer);
35 | return pipelineTracer;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/samples/DocumentsAndFolders.Sqs.Core/DocumentsAndFolders.Sqs.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard1.5;net452
5 | full
6 | false
7 | false
8 | false
9 | false
10 | false
11 | false
12 | false
13 | false
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/samples/EventSourcing/Ports/Commands/GreetingCommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 | using Paramore.Brighter;
27 |
28 | namespace EventSourcing.Ports.Commands
29 | {
30 | internal class GreetingCommand : Command
31 | {
32 | public GreetingCommand() : base(Guid.NewGuid()) {/* */}
33 |
34 | public GreetingCommand(string name)
35 | :base(Guid.NewGuid())
36 | {
37 | Name = name;
38 | }
39 |
40 | public string Name { get; set; }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/samples/GenericListener/Adapters/Services/HandlerConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using GenericListener.Infrastructure;
3 | using Paramore.Brighter;
4 |
5 | namespace GenericListener.Adapters.Services
6 | {
7 | public class HandlerConfig
8 | {
9 | private readonly MessageMapperFactory _mappers;
10 | private readonly HandlerFactory _handlers;
11 |
12 | public HandlerConfig(MessageMapperFactory mappers, HandlerFactory handlers)
13 | {
14 | _mappers = mappers;
15 | _handlers = handlers;
16 | }
17 |
18 | public void Register()
19 | where TRequest : class, IRequest
20 | where TMapper : class, IAmAMessageMapper
21 | where THandler : class, IHandleRequests
22 | {
23 | _mappers.Register();
24 | _handlers.Register();
25 | }
26 |
27 | public void Register(Type type, Type handler, Type mapper)
28 | {
29 | _mappers.Register(type, mapper);
30 | _handlers.Register(type, handler);
31 | }
32 |
33 | public void Register()
34 | where TRequest : class, IRequest
35 | where THandler : class, IHandleRequests
36 | {
37 | _handlers.Register();
38 | }
39 |
40 | public IAmAMessageMapperRegistry Mappers
41 | {
42 | get { return _mappers; }
43 | }
44 |
45 | public HandlerConfiguration Handlers
46 | {
47 | get { return new HandlerConfiguration(_handlers, _handlers); }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.RESTMS/Parsers/ResultParserException.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.MessagingGateway.RESTMS.Parsers
28 | {
29 | internal class ResultParserException : Exception
30 | {
31 | public ResultParserException() { }
32 |
33 | public ResultParserException(string message) : base(message) { }
34 |
35 | public ResultParserException(string message, Exception innerException) : base(message, innerException) { }
36 | }
37 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyObsoleteCommandHandlerAsync.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Threading.Tasks;
4 |
5 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
6 | {
7 | internal class MyObsoleteCommandHandlerAsync : RequestHandlerAsync
8 | {
9 | private static MyCommand s_command;
10 |
11 | public MyObsoleteCommandHandlerAsync()
12 | {
13 | s_command = null;
14 | }
15 |
16 | #pragma warning disable CS0809 // Obsolete member overrides non-obsolete member
17 | [MyPreValidationHandlerAsync(2, HandlerTiming.Before)]
18 | [MyPostLoggingHandlerAsync(1, HandlerTiming.After)]
19 | [Obsolete] // even with attributes non inheriting from MessageHandlerDecoratorAttribute it should not fail
20 | public override async Task HandleAsync(MyCommand command, CancellationToken cancellationToken = default(CancellationToken))
21 | {
22 | if (cancellationToken.IsCancellationRequested)
23 | {
24 | return command;
25 | }
26 |
27 | LogCommand(command);
28 | return await base.HandleAsync(command, cancellationToken).ConfigureAwait(ContinueOnCapturedContext);
29 | }
30 | #pragma warning restore CS0809 // Obsolete member overrides non-obsolete member
31 |
32 | public static bool Shouldreceive(MyCommand expectedCommand)
33 | {
34 | return s_command != null && expectedCommand.Id == s_command.Id;
35 | }
36 |
37 | private void LogCommand(MyCommand request)
38 | {
39 | s_command = request;
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/When_Building_An_Async_Pipeline_That_Has_Sync_Handlers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using FluentAssertions;
4 | using Paramore.Brighter.Tests.CommandProcessors.TestDoubles;
5 | using TinyIoC;
6 | using Xunit;
7 |
8 | namespace Paramore.Brighter.Tests.CommandProcessors
9 | {
10 | public class PipelineMixedHandlersAsyncTests
11 | {
12 | private readonly PipelineBuilder _pipelineBuilder;
13 | private IHandleRequestsAsync _pipeline;
14 | private Exception _exception;
15 |
16 | public PipelineMixedHandlersAsyncTests()
17 | {
18 | var registry = new SubscriberRegistry();
19 | registry.RegisterAsync();
20 |
21 | var container = new TinyIoCContainer();
22 | var handlerFactory = new TinyIocHandlerFactoryAsync(container);
23 | container.Register, MyMixedImplicitHandlerAsync>();
24 | container.Register, MyLoggingHandler>();
25 |
26 | _pipelineBuilder = new PipelineBuilder(registry, handlerFactory);
27 | }
28 |
29 | [Fact]
30 | public void When_Building_An_Async_Pipeline_That_Has_Sync_Handlers()
31 | {
32 | _exception = Catch.Exception(() => _pipeline = _pipelineBuilder.BuildAsync(new RequestContext(), false).First());
33 |
34 | _exception.Should().NotBeNull();
35 | _exception.Should().BeOfType();
36 | _exception.Message.Should().Contain(typeof(MyLoggingHandler<>).Name);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/samples/ManagementAndMonitoring/Ports/Commands/GreetingCommand.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2015 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 | using Paramore.Brighter;
27 |
28 | namespace ManagementAndMonitoring.Ports.Commands
29 | {
30 | public class GreetingCommand : Command
31 | {
32 | public GreetingCommand() : base(Guid.NewGuid()) { }
33 |
34 | public GreetingCommand(string greeting) : base(Guid.NewGuid())
35 | {
36 | Greeting = greeting;
37 | }
38 |
39 | public string Greeting { get; set; }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/MessagingGateway/awssqs/When_posting_a_message_via_the_messaging_gateway_and_sns_topic_does_not_exist.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Amazon.Runtime;
3 | using Amazon.SimpleNotificationService.Model;
4 | using FluentAssertions;
5 | using Paramore.Brighter.MessagingGateway.AWSSQS;
6 | using Xunit;
7 |
8 | namespace Paramore.Brighter.Tests.MessagingGateway.AWSSQS
9 | {
10 | [Trait("Category", "AWS")]
11 | public class SqsMessageProducerMissingTopicTests : IDisposable
12 | {
13 | private readonly Message _message;
14 | private readonly SqsMessageProducer _messageProducer;
15 | private readonly TestAWSQueueListener _queueListener;
16 | private Topic _topic;
17 |
18 | public SqsMessageProducerMissingTopicTests()
19 | {
20 | _queueListener = new TestAWSQueueListener(new AnonymousAWSCredentials());
21 | _message = new Message(new MessageHeader(Guid.NewGuid(), "AnotherTestSqsTopic", MessageType.MT_COMMAND), new MessageBody("test content"));
22 |
23 | var credentials = new AnonymousAWSCredentials();
24 | _messageProducer = new SqsMessageProducer(credentials);
25 | }
26 |
27 | [Fact]
28 | public void When_posting_a_message_via_the_messaging_gateway_and_sns_topic_does_not_exist()
29 | {
30 | _messageProducer.Send(_message);
31 |
32 | _topic = _queueListener.CheckSnsTopic(_message.Header.Topic);
33 |
34 | //should_create_topic_and_send_the_message
35 | _topic.Should().NotBeNull();
36 | }
37 |
38 | public void Dispose()
39 | {
40 | _queueListener.DeleteTopic(_message.Header.Topic);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyAbortingHandlerAttribute.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | public class MyAbortingHandlerAttribute : RequestHandlerAttribute
30 | {
31 | public MyAbortingHandlerAttribute(int step, HandlerTiming timing) : base(step, timing) {}
32 |
33 | public override Type GetHandlerType()
34 | {
35 | return typeof(MyAbortingHandler<>);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter.MessagingGateway.RMQ/MessagingGatewayConfiguration/RmqGatewayBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Paramore.Brighter.MessagingGateway.RMQ.MessagingGatewayConfiguration
4 | {
5 | public class RmqGatewayBuilder :
6 | RmqGatewayBuilder.IRmqGatewayBuilderUri,
7 | RmqGatewayBuilder.IRmqGatewayBuilderExchange,
8 | RmqGatewayBuilder.IRmqGatewayBuilderQueues
9 | {
10 | private string _exchangeName;
11 | private Uri _ampqUri;
12 |
13 | private RmqGatewayBuilder() { }
14 |
15 | public static IRmqGatewayBuilderUri With => new RmqGatewayBuilder();
16 |
17 | public IRmqGatewayBuilderExchange Uri(Uri uri)
18 | {
19 | _ampqUri = uri;
20 | return this;
21 | }
22 |
23 | public IRmqGatewayBuilderQueues Exchange(string exchangeName)
24 | {
25 | _exchangeName = exchangeName;
26 | return this;
27 | }
28 |
29 | public RmqMessagingGatewayConnection DefaultQueues()
30 | {
31 | return new RmqMessagingGatewayConnection
32 | {
33 | AmpqUri = new AmqpUriSpecification(_ampqUri),
34 | Exchange = new Exchange(_exchangeName)
35 | };
36 | }
37 |
38 | public interface IRmqGatewayBuilderUri
39 | {
40 | IRmqGatewayBuilderExchange Uri(Uri uri);
41 | }
42 |
43 | public interface IRmqGatewayBuilderExchange
44 | {
45 | IRmqGatewayBuilderQueues Exchange(string exchangeName);
46 | }
47 |
48 | public interface IRmqGatewayBuilderQueues
49 | {
50 | RmqMessagingGatewayConnection DefaultQueues();
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyLoggingHandlerAttribute.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | internal class MyLoggingHandlerAttribute : RequestHandlerAttribute
30 | {
31 | public MyLoggingHandlerAttribute(int step)
32 | : base(step)
33 | {
34 | }
35 |
36 | public override Type GetHandlerType()
37 | {
38 | return typeof(MyLoggingHandler<>);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter.CommandStore.Sqlite/README.md:
--------------------------------------------------------------------------------
1 | # Brighter Sqlite command store
2 |
3 | ## Setup
4 |
5 | To setup Brighter with a Sqlite command store, some steps are required:
6 |
7 | #### Create a table with the schema in the example
8 |
9 | You can use the following example as a reference for SQL Server:
10 |
11 | ```sql
12 | CREATE TABLE MyMessageStore (
13 | Id uniqueidentifier CONSTRAINT PK_MessageId PRIMARY KEY,
14 | Topic nvarchar(255),
15 | MessageType nvarchar(32),
16 | Body nvarchar(max)
17 | )
18 | ```
19 | If you're using SQL CE you have to replace `nvarchar(max)` with a supported type, for example `ntext`.
20 |
21 | #### Configure the command processor
22 |
23 | The following is an example of how to configure a command processor with a SQL Server message store.
24 |
25 | ```csharp
26 | var msSqlMessageStore = new MsSqlMessageStore(new MsSqlMessageStoreConfiguration(
27 | "myconnectionstring",
28 | "MyMessageStoreTable",
29 | MsSqlMessageStoreConfiguration.DatabaseType.MsSqlServer
30 | ), myLogger),
31 |
32 | var commandProcessor = CommandProcessorBuilder.With()
33 | .Handlers(new HandlerConfiguration(mySubscriberRegistry, myHandlerFactory))
34 | .Policies(myPolicyRegistry)
35 | .Logger(myLogger)
36 | .TaskQueues(new MessagingConfiguration(
37 | messageStore: msSqlMessageStore,
38 | messagingGateway: myGateway,
39 | messageMapperRegistry: myMessageMapperRegistry
40 | ))
41 | .RequestContextFactory(new InMemoryRequestContextFactory())
42 | .Build();
43 | ```
44 |
45 | > The values for the `MsSqlMessageStoreConfiguration.DatabaseType` enum are the following:
46 | > `MsSqlServer`
47 | > `SqlCe`
48 |
--------------------------------------------------------------------------------
/src/Paramore.Brighter/PipelineTracer.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System.Text;
26 |
27 | namespace Paramore.Brighter
28 | {
29 | public class PipelineTracer : IAmAPipelineTracer
30 | {
31 | private readonly StringBuilder _buffer = new StringBuilder();
32 |
33 | public void AddToPath(HandlerName handlerName)
34 | {
35 | _buffer.AppendFormat("{0}|", handlerName);
36 | }
37 |
38 | public override string ToString()
39 | {
40 | return _buffer.ToString();
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/CommandProcessors/TestDoubles/MyValidationHandlerAttribute.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter.Tests.CommandProcessors.TestDoubles
28 | {
29 | internal class MyValidationHandlerAttribute : RequestHandlerAttribute
30 | {
31 | public MyValidationHandlerAttribute(int step)
32 | : base(step)
33 | {
34 | }
35 |
36 | public override Type GetHandlerType()
37 | {
38 | return typeof(MyValidationHandler<>);
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/tests/Paramore.Brighter.Tests/MessagingGateway/awssqs/When_posting_a_message_via_the_messaging_gateway.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Amazon.Runtime;
3 | using FluentAssertions;
4 | using Paramore.Brighter.MessagingGateway.AWSSQS;
5 | using Xunit;
6 |
7 | namespace Paramore.Brighter.Tests.MessagingGateway.AWSSQS
8 | {
9 | [Trait("Category", "AWS")]
10 | public class SqsMessageProeducerSendTests : IDisposable
11 | {
12 | private readonly string _queueUrl = "https://sqs.eu-west-1.amazonaws.com/027649620536/TestSqsTopicQueue";
13 | private readonly Message _message;
14 | private readonly SqsMessageProducer _messageProducer;
15 | private readonly TestAWSQueueListener _queueListener;
16 | private Amazon.SQS.Model.Message _listenedMessage;
17 |
18 | public SqsMessageProeducerSendTests()
19 | {
20 | _queueListener = new TestAWSQueueListener(new AnonymousAWSCredentials(), _queueUrl);
21 | _message = new Message(new MessageHeader(Guid.NewGuid(), "TestSqsTopic", MessageType.MT_COMMAND), new MessageBody("test content"));
22 |
23 | var credentials = new AnonymousAWSCredentials();
24 | _messageProducer = new SqsMessageProducer(credentials);
25 | }
26 |
27 | [Fact]
28 | public void When_posting_a_message_via_the_messaging_gateway()
29 | {
30 | _messageProducer.Send(_message);
31 | _listenedMessage = _queueListener.Listen();
32 |
33 | //should_send_the_message_to_aws_sqs
34 | _listenedMessage.Body.Should().NotBeNull();
35 | }
36 |
37 | public void Dispose()
38 | {
39 | _queueListener.DeleteMessage(_listenedMessage.ReceiptHandle);
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/src/Paramore.Brighter/IRequest.cs:
--------------------------------------------------------------------------------
1 | #region Licence
2 | /* The MIT License (MIT)
3 | Copyright © 2014 Ian Cooper
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. */
22 |
23 | #endregion
24 |
25 | using System;
26 |
27 | namespace Paramore.Brighter
28 | {
29 | ///
30 | /// Interface IRequest
31 | /// Base class of and . A request that can be handled by the Command Processor/Dispatcher
32 | ///
33 | public interface IRequest
34 | {
35 | ///
36 | /// Gets or sets the identifier.
37 | ///
38 | /// The identifier.
39 | Guid Id { get; set; }
40 | }
41 | }
--------------------------------------------------------------------------------
/help/SearchHelp.php:
--------------------------------------------------------------------------------
1 |
2 | // Contributed to the Sandcastle Help File Builder project by Thomas Levesque
3 |
4 | include("SearchHelp.inc.php");
5 |
6 | $sortByTitle = false;
7 |
8 | // The keywords for which to search should be passed in the query string
9 | $searchText = $_GET["Keywords"];
10 |
11 | if(empty($searchText))
12 | {
13 | ?>
14 | Nothing found
15 |
16 | return;
17 | }
18 |
19 | // An optional SortByTitle option can also be specified
20 | if($_GET["SortByTitle"] == "true")
21 | $sortByTitle = true;
22 |
23 | $keywords = ParseKeywords($searchText);
24 | $letters = array();
25 | $wordDictionary = array();
26 |
27 | // Load the file index
28 | $json = file_get_contents("fti/FTI_Files.json");
29 | $fileList = json_decode($json);
30 |
31 | // Load the required word index files
32 | foreach($keywords as $word)
33 | {
34 | $letter = substr($word, 0, 1);
35 |
36 | if(!in_array($letter, $letters))
37 | {
38 | array_push($letters, $letter);
39 | $ascii = ord($letter);
40 | $ftiFile = "fti/FTI_$ascii.json";
41 |
42 | if(file_exists($ftiFile))
43 | {
44 | $json = file_get_contents($ftiFile);
45 | $ftiWords = json_decode($json, true);
46 |
47 | foreach($ftiWords as $ftiWord => $val)
48 | {
49 | $wordDictionary[$ftiWord] = $val;
50 | }
51 | }
52 | }
53 | }
54 |
55 | // Perform the search and return the results as a block of HTML
56 | $results = Search($keywords, $fileList, $wordDictionary, $sortByTitle);
57 | echo $results;
58 | ?>
--------------------------------------------------------------------------------