Skip to content
Browse files

merged develop - this is a very stable version and it will work well …

…in master
  • Loading branch information...
2 parents 11675ae + 2c8be47 commit 4460070f7c6a1dd37c329b6eaabec857ec057202 @haf committed Mar 23, 2012
Showing with 7,903 additions and 1,473 deletions.
  1. +5 −2 .gitignore
  2. +5 −0 .semver
  3. +6 −0 Gemfile
  4. +17 −0 Gemfile.lock
  5. +0 −3 README.md
  6. +159 −0 Rakefile.rb
  7. +226 −0 buildscripts/environment.rb
  8. +151 −0 buildscripts/paths.rb
  9. +25 −0 buildscripts/project_details.rb
  10. +42 −0 buildscripts/utils.rb
  11. +1 −0 src/Documently-CQRS.sln.DotSettings.user
  12. +32 −38 src/Documently.App/Documently.App.csproj
  13. +13 −13 src/Documently.App/Program.cs
  14. +6 −2 src/Documently.App/app.config
  15. +11 −13 src/Documently.App/packages.config
  16. +3 −18 src/Documently.Commands/Command.cs
  17. +5 −7 src/Documently.Commands/CreateDocumentMetaData.cs
  18. +5 −2 src/Documently.Commands/CreateNewCustomer.cs
  19. +3 −1 src/Documently.Commands/CreateNewDocumentCollection.cs
  20. +6 −8 src/Documently.Commands/{ → DocumentMetaData}/AssociateDocumentWithCollection.cs
  21. +8 −3 src/Documently.Commands/Documently.Commands.csproj
  22. +4 −7 src/Documently.Commands/InitializeDocumentIndexing.cs
  23. +5 −8 src/Documently.Commands/RelocateTheCustomer.cs
  24. +20 −0 src/Documently.Commands/ShareDocument.cs
  25. +1 −1 src/Documently.Commands/packages.config
  26. +27 −24 src/Documently.Domain.Service/Documently.Domain.Service.csproj
  27. +8 −7 src/Documently.Domain.Service/Program.cs
  28. +8 −37 src/Documently.Domain.Service/app.config
  29. +12 −11 src/Documently.Domain.Service/packages.config
  30. +1 −1 src/Documently.Domain/CommandHandlers/CreateCustomerCommandHandler.cs
  31. +3 −2 src/Documently.Domain/CommandHandlers/DocumentAssociatedWithCollectionHandler.cs
  32. +1 −1 src/Documently.Domain/CommandHandlers/DocumentIndexingHandler.cs
  33. +5 −3 src/Documently.Domain/CommandHandlers/DocumentMetaDataHandler.cs
  34. +1 −1 src/Documently.Domain/CommandHandlers/RelocatingCustomerCommandHandler.cs
  35. +28 −0 src/Documently.Domain/CommandHandlers/ShareDocumentCommandHandler.cs
  36. +16 −22 src/Documently.Domain/Documently.Domain.csproj
  37. +6 −5 src/Documently.Domain/Domain/Customer.cs
  38. +0 −50 src/Documently.Domain/Domain/Document.cs
  39. +4 −3 src/Documently.Domain/Domain/DocumentCollection.cs
  40. +80 −0 src/Documently.Domain/Domain/DocumentMetaData.cs
  41. +31 −0 src/Documently.Domain/Domain/User.cs
  42. +0 −24 src/Documently.Domain/Events/AssociatedIndexingPending.cs
  43. +0 −22 src/Documently.Domain/Events/DocumentCollectionCreated.cs
  44. +0 −18 src/Documently.Domain/Events/DocumentIndexed.cs
  45. +0 −27 src/Documently.Domain/Events/DocumentMetaDataCreated.cs
  46. +0 −36 src/Documently.Domain/Events/DomainEvent.cs
  47. +4 −5 src/Documently.Domain/packages.config
  48. +0 −4 src/Documently.Indexer.Tests/Documently.Indexer.Tests.csproj
  49. +1 −1 src/Documently.Indexer/IndexerServices.fs
  50. +42 −39 src/Documently.Infrastructure/Documently.Infrastructure.csproj
  51. +3 −3 src/Documently.Infrastructure/IBus.cs
  52. +8 −2 src/Documently.Infrastructure/InProcessBus.cs
  53. +3 −3 src/Documently.Infrastructure/Installers/BusInstaller.cs
  54. +3 −3 src/Documently.Infrastructure/Installers/EventStoreInstaller.cs
  55. +1 −1 src/Documently.Infrastructure/Misc/EventDescriptor.cs
  56. +1 −1 src/Documently.Infrastructure/Misc/EventHandlerHelper.cs
  57. +2 −2 src/Documently.Infrastructure/RegisterEventHandlersInBus.cs
  58. +14 −14 src/Documently.Infrastructure/packages.config
  59. +14 −16 ...Documently.Domain/Events/CustomerCreatedEvent.cs → Documently.Messages/CustomerEvents/Created.cs}
  60. +7 −4 ...mently.Domain/Events/CustomerRelocatedEvent.cs → Documently.Messages/CustomerEvents/Relocated.cs}
  61. +18 −0 src/Documently.Messages/DocumentCollection/CollectionCreated.cs
  62. +5 −8 src/{Documently.Domain/Events → Documently.Messages/DocumentMetaData}/AssociatedWithCollection.cs
  63. +22 −0 src/Documently.Messages/DocumentMetaData/Created.cs
  64. +22 −0 src/Documently.Messages/DocumentMetaData/DocumentUploaded.cs
  65. +23 −0 src/Documently.Messages/DocumentMetaData/Shared.cs
  66. +79 −0 src/Documently.Messages/Documently.Messages.csproj
  67. +22 −0 src/Documently.Messages/DomainEvent.cs
  68. +9 −0 src/Documently.Messages/Indexer/IndexingCompleted.cs
  69. +23 −0 src/Documently.Messages/Indexer/IndexingTakingTooLong.cs
  70. +18 −0 src/Documently.Messages/Indexer/Started.cs
  71. +36 −0 src/Documently.Messages/Properties/AssemblyInfo.cs
  72. +5 −0 src/Documently.Messages/packages.config
  73. +5 −4 src/Documently.ReadModel/CustomerAddressView.cs
  74. +5 −4 src/Documently.ReadModel/CustomerHasLivedInCitiesView.cs
  75. +5 −4 src/Documently.ReadModel/CustomerListView.cs
  76. +24 −23 src/Documently.ReadModel/Documently.ReadModel.csproj
  77. +2 −2 src/Documently.ReadModel/HandlesEvent.cs
  78. +5 −6 src/Documently.ReadModel/packages.config
  79. +57 −0 src/Documently.Sagas.Service/Documently.Sagas.Service.csproj
  80. +14 −0 src/Documently.Sagas.Service/Program.cs
  81. +36 −0 src/Documently.Sagas.Service/Properties/AssemblyInfo.cs
  82. +19 −0 src/Documently.Sagas.Specs/DiagramTest.cs
  83. +84 −0 src/Documently.Sagas.Specs/Documently.Sagas.Specs.csproj
  84. +35 −0 src/Documently.Sagas.Specs/Indexing_saga_spec.cs
  85. +36 −0 src/Documently.Sagas.Specs/Properties/AssemblyInfo.cs
  86. +8 −0 src/Documently.Sagas.Specs/packages.config
  87. +81 −0 src/Documently.Sagas/Documently.Sagas.csproj
  88. +94 −0 src/Documently.Sagas/IndexerOrchestrationSaga.cs
  89. +36 −0 src/Documently.Sagas/Properties/AssemblyInfo.cs
  90. +7 −0 src/Documently.Sagas/packages.config
  91. +25 −27 ...omainEventListener.csproj → Documently.SampleEventListener/Documently.SampleEventListener.csproj}
  92. +27 −0 src/Documently.SampleEventListener/Program.cs
  93. 0 src/{DomainEventListener → Documently.SampleEventListener}/Properties/AssemblyInfo.cs
  94. +7 −0 src/{DomainEventListener → Documently.SampleEventListener}/app.config
  95. +7 −0 src/Documently.SampleEventListener/packages.config
  96. +0 −41 src/Documently.Specs/AggregateRootTestFixture.cs
  97. +1 −1 src/Documently.Specs/CollectionExtensions.cs
  98. +3 −4 src/Documently.Specs/CommandTestFixture.cs
  99. +2 −2 src/Documently.Specs/Commands/All_commands_and_events_must_have_default_ctor.cs
  100. +1 −1 src/Documently.Specs/Commands/All_commands_must_be_Serializable.cs
  101. +9 −9 src/Documently.Specs/Customers/when_creating_a_new_customer.cs
  102. +34 −34 src/Documently.Specs/Documently.Specs.csproj
  103. +3 −3 src/Documently.Specs/Documents/when_creating_new_documentCollection.cs
  104. +3 −3 src/Documently.Specs/Documents/when_creating_new_documentCollection_no_name_given.cs
  105. +24 −10 src/Documently.Specs/Documents/when_creating_new_document_meta_data.cs
  106. +6 −5 src/Documently.Specs/Documents/when_document_is_associated_with_a_collection.cs
  107. +50 −0 src/Documently.Specs/Documents/when_sharing_a_document.cs
  108. +6 −6 src/Documently.Specs/Documents/when_uploaded_document_itself.cs
  109. +4 −3 src/Documently.Specs/Events/All_domain_events_must_be_Serializable.cs
  110. +2 −4 src/Documently.Specs/FakePublisher.cs
  111. +1 −1 src/Documently.Specs/FakeRepository.cs
  112. +9 −10 src/Documently.Specs/packages.config
  113. +3 −3 src/Documently.Specs/view_registration_specs.cs
  114. +36 −29 src/Documently.WpfClient/Documently.WpfClient.csproj
  115. 0 src/{packages/Caliburn.Micro.1.2.0/tools/NET40 → Documently.WpfClient}/IShell.cs
  116. +3 −3 src/Documently.WpfClient/Modules/CustomerDetails/CreateCustomer/CreateCustomerViewModel.cs
  117. +4 −3 src/Documently.WpfClient/Modules/CustomerDetails/CustomerRelocating/CustomerRelocatingViewModel.cs
  118. +18 −0 src/Documently.WpfClient/Modules/DocumentDetails/CreateMeta/CreateDocumentMetaDataView.xaml
  119. +24 −0 src/Documently.WpfClient/Modules/DocumentDetails/CreateMeta/CreateDocumentMetaDataView.xaml.cs
  120. +3 −2 src/Documently.WpfClient/Modules/DocumentSearch/DocumentSearchViewModel.cs
  121. +7 −2 src/Documently.WpfClient/Modules/Shell/ShellViewModel.cs
  122. +10 −2 src/Documently.WpfClient/app.config
  123. +11 −12 src/Documently.WpfClient/packages.config
  124. +67 −24 src/{Documently-CQRS.sln → Documently.sln}
  125. +2 −0 src/Documently.sln.DotSettings
  126. +2 −0 src/Documently.sln.DotSettings.user
  127. +0 −26 src/DomainEventListener/Program.cs
  128. +0 −6 src/DomainEventListener/packages.config
  129. +3 −0 src/README.md
  130. BIN src/packages/Automatonymous.0.3.2.0/Automatonymous.0.3.2.0.nupkg
  131. BIN src/packages/Automatonymous.0.3.2.0/lib/net40/Automatonymous.dll
  132. BIN src/packages/Automatonymous.0.3.2.0/lib/net40/Automatonymous.pdb
  133. +283 −0 src/packages/Automatonymous.0.3.2.0/lib/net40/Automatonymous.xml
  134. BIN src/packages/Automatonymous.MassTransit.0.3.2.0/Automatonymous.MassTransit.0.3.2.0.nupkg
  135. BIN src/packages/Automatonymous.MassTransit.0.3.2.0/lib/net40/Automatonymous.MassTransitIntegration.dll
  136. BIN src/packages/Automatonymous.MassTransit.0.3.2.0/lib/net40/Automatonymous.MassTransitIntegration.pdb
  137. +18 −0 src/packages/Automatonymous.MassTransit.0.3.2.0/lib/net40/Automatonymous.MassTransitIntegration.xml
  138. BIN src/packages/Caliburn.Micro.1.1.0/tools/NET40/AppBootstrapper.cs
  139. BIN src/packages/Caliburn.Micro.1.1.0/tools/NET40/IShell.cs
  140. BIN src/packages/Caliburn.Micro.1.1.0/tools/NET40/ShellView.xaml
  141. BIN src/packages/Caliburn.Micro.1.1.0/tools/NET40/ShellViewModel.cs
  142. BIN src/packages/Caliburn.Micro.1.2.0/Caliburn.Micro.1.2.0.nupkg
  143. BIN src/packages/Caliburn.Micro.1.2.0/lib/Net40/Caliburn.Micro.dll
  144. BIN src/packages/Caliburn.Micro.1.2.0/lib/Net40/Caliburn.Micro.pdb
  145. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40-wp/Caliburn.Micro.Extensions.dll
  146. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40-wp/Caliburn.Micro.Extensions.pdb
  147. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40-wp/Caliburn.Micro.dll
  148. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40-wp/Caliburn.Micro.pdb
  149. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40-wp/System.Windows.Interactivity.dll
  150. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40/Caliburn.Micro.dll
  151. BIN src/packages/Caliburn.Micro.1.2.0/lib/SL40/Caliburn.Micro.pdb
  152. BIN src/packages/Caliburn.Micro.1.3.1/Caliburn.Micro.1.3.1.nupkg
  153. BIN src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.Extensions.dll
  154. BIN src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.Extensions.pdb
  155. +164 −0 src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.Extensions.xml
  156. BIN src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.dll
  157. BIN src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.pdb
  158. +424 −0 src/packages/Caliburn.Micro.1.3.1/lib/WinRT45/Caliburn.Micro.xml
  159. BIN src/packages/Caliburn.Micro.1.3.1/lib/net40/Caliburn.Micro.dll
  160. BIN src/packages/Caliburn.Micro.1.3.1/lib/net40/Caliburn.Micro.pdb
  161. +453 −74 src/packages/{Caliburn.Micro.1.2.0/lib/Net40 → Caliburn.Micro.1.3.1/lib/net40}/Caliburn.Micro.xml
  162. 0 ...Caliburn.Micro.1.2.0/lib/Net40 → Caliburn.Micro.1.3.1/lib/net40}/System.Windows.Interactivity.dll
  163. 0 ...Caliburn.Micro.1.2.0/lib/Net40 → Caliburn.Micro.1.3.1/lib/net40}/System.Windows.Interactivity.xml
  164. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/Caliburn.Micro.Extensions.dll
  165. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/Caliburn.Micro.Extensions.pdb
  166. +445 −439 ...ro.1.2.0/lib/SL40-wp → Caliburn.Micro.1.3.1/lib/sl4-windowsphone71}/Caliburn.Micro.Extensions.xml
  167. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/Caliburn.Micro.dll
  168. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/Caliburn.Micro.pdb
  169. +3,211 −0 src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/Caliburn.Micro.xml
  170. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/System.Windows.Interactivity.dll
  171. 0 ...ro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4-windowsphone71}/System.Windows.Interactivity.xml
  172. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/de/System.Windows.Interactivity.resources.dll
  173. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/en/System.Windows.Interactivity.resources.dll
  174. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/es/System.Windows.Interactivity.resources.dll
  175. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/fr/System.Windows.Interactivity.resources.dll
  176. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/it/System.Windows.Interactivity.resources.dll
  177. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/ja/System.Windows.Interactivity.resources.dll
  178. BIN ...ackages/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/ko/System.Windows.Interactivity.resources.dll
  179. BIN ...es/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/zh-Hans/System.Windows.Interactivity.resources.dll
  180. BIN ...es/Caliburn.Micro.1.3.1/lib/sl4-windowsphone71/zh-Hant/System.Windows.Interactivity.resources.dll
  181. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4/Caliburn.Micro.dll
  182. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl4/Caliburn.Micro.pdb
  183. +454 −70 src/packages/{Caliburn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/Caliburn.Micro.xml
  184. BIN ...ckages/{Caliburn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/System.Windows.Controls.dll
  185. 0 ...ckages/{Caliburn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/System.Windows.Controls.xml
  186. BIN ...s/{Caliburn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/System.Windows.Interactivity.dll
  187. +106 −45 ...Caliburn.Micro.1.2.0/lib/SL40-wp → Caliburn.Micro.1.3.1/lib/sl4}/System.Windows.Interactivity.xml
  188. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ar/System.Windows.Controls.resources.dll
  189. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/bg/System.Windows.Controls.resources.dll
  190. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ca/System.Windows.Controls.resources.dll
  191. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/cs/System.Windows.Controls.resources.dll
  192. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/da/System.Windows.Controls.resources.dll
  193. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/de/System.Windows.Controls.resources.dll
  194. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/el/System.Windows.Controls.resources.dll
  195. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/es/System.Windows.Controls.resources.dll
  196. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/et/System.Windows.Controls.resources.dll
  197. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/eu/System.Windows.Controls.resources.dll
  198. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/fi/System.Windows.Controls.resources.dll
  199. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/fr/System.Windows.Controls.resources.dll
  200. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/he/System.Windows.Controls.resources.dll
  201. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/hr/System.Windows.Controls.resources.dll
  202. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/hu/System.Windows.Controls.resources.dll
  203. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/id/System.Windows.Controls.resources.dll
  204. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/it/System.Windows.Controls.resources.dll
  205. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ja/System.Windows.Controls.resources.dll
  206. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ko/System.Windows.Controls.resources.dll
  207. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/lt/System.Windows.Controls.resources.dll
  208. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/lv/System.Windows.Controls.resources.dll
  209. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ms/System.Windows.Controls.resources.dll
  210. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/nl/System.Windows.Controls.resources.dll
  211. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/no/System.Windows.Controls.resources.dll
  212. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/pl/System.Windows.Controls.resources.dll
  213. BIN ....Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/pt-BR/System.Windows.Controls.resources.dll
  214. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/pt/System.Windows.Controls.resources.dll
  215. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ro/System.Windows.Controls.resources.dll
  216. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/ru/System.Windows.Controls.resources.dll
  217. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/sk/System.Windows.Controls.resources.dll
  218. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/sl/System.Windows.Controls.resources.dll
  219. BIN ...o.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/sr-Cyrl-CS/System.Windows.Controls.resources.dll
  220. BIN ...o.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/sr-Latn-CS/System.Windows.Controls.resources.dll
  221. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/sv/System.Windows.Controls.resources.dll
  222. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/th/System.Windows.Controls.resources.dll
  223. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/tr/System.Windows.Controls.resources.dll
  224. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/uk/System.Windows.Controls.resources.dll
  225. BIN ...urn.Micro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/vi/System.Windows.Controls.resources.dll
  226. BIN ...icro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/zh-Hans/System.Windows.Controls.resources.dll
  227. BIN ...icro.1.2.0/lib/SL40 → Caliburn.Micro.1.3.1/lib/sl4}/zh-Hant/System.Windows.Controls.resources.dll
  228. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl5/Caliburn.Micro.dll
  229. BIN src/packages/Caliburn.Micro.1.3.1/lib/sl5/Caliburn.Micro.pdb
Sorry, we could not display the entire diff because too many files (763) changed.
View
7 .gitignore
@@ -4,5 +4,8 @@ src/_ReSharper.*
bin/
obj/
*.csproj.user
-src/packages/RavenDB.1.0.499/server/Data/
-src/packages/RavenDB.1.0.499/server/Logs
+Data/
+Logs/
+*.tmp_proj
+src/SharedAssemblyInfo.cs
+build/
View
5 .semver
@@ -0,0 +1,5 @@
+---
+:major: 0
+:minor: 1
+:patch: 0
+:special: ""
View
6 Gemfile
@@ -0,0 +1,6 @@
+source "http://rubygems.org"
+
+gem 'rake'
+gem 'albacore'
+gem 'semver2'
+gem 'bundler'
View
17 Gemfile.lock
@@ -0,0 +1,17 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ albacore (0.2.7)
+ rubyzip (~> 0.9)
+ rake (0.9.2.2)
+ rubyzip (0.9.6.1)
+ semver2 (3.0.1)
+
+PLATFORMS
+ x86-mingw32
+
+DEPENDENCIES
+ albacore
+ bundler
+ rake
+ semver2
View
3 README.md
@@ -6,9 +6,6 @@ I (Henrik) want to make it easy for people to get started with this
architecture - why not try to maximize developer happiness and make the
world a better place and learn it yourself while you're at it?
-In its current state, documently is not complete, but it is runnable and you can
-learn the basic concepts of CQRS from the customer domain.
-
Some of the concepts you can learn include:
* Creating a Caliburn Micro WPF client with a ribbon, which uses the *EventAggregator* pattern for its reactive UI and wires itself up with Castle Windsor.
View
159 Rakefile.rb
@@ -0,0 +1,159 @@
+require "rubygems"
+require "bundler"
+Bundler.setup
+$: << './'
+
+require 'albacore'
+require 'rake/clean'
+require 'semver'
+
+require 'buildscripts/utils'
+require 'buildscripts/paths'
+require 'buildscripts/project_details'
+require 'buildscripts/environment'
+
+# to get the current version of the project, type 'SemVer.find.to_s' in this rake file.
+
+desc 'generate the shared assembly info'
+assemblyinfo :assemblyinfo => ["env:release"] do |asm|
+ data = commit_data() #hash + date
+ asm.product_name = asm.title = PROJECTS[:app][:title]
+ asm.description = PROJECTS[:app][:description] + " #{data[0]} - #{data[1]}"
+ asm.company_name = PROJECTS[:app][:company]
+ # This is the version number used by framework during build and at runtime to locate, link and load the assemblies. When you add reference to any assembly in your project, it is this version number which gets embedded.
+ asm.version = BUILD_VERSION
+ # Assembly File Version : This is the version number given to file as in file system. It is displayed by Windows Explorer. Its never used by .NET framework or runtime for referencing.
+ asm.file_version = BUILD_VERSION
+ asm.custom_attributes :AssemblyInformationalVersion => "#{BUILD_VERSION}", # disposed as product version in explorer
+ :CLSCompliantAttribute => false,
+ :AssemblyConfiguration => "#{CONFIGURATION}",
+ :Guid => PROJECTS[:app][:guid]
+ asm.com_visible = false
+ asm.copyright = PROJECTS[:app][:copyright]
+ asm.output_file = File.join(FOLDERS[:src], 'SharedAssemblyInfo.cs')
+ asm.namespaces = "System", "System.Reflection", "System.Runtime.InteropServices", "System.Security"
+end
+
+
+desc "build sln file"
+msbuild :msbuild do |msb|
+ msb.solution = FILES[:sln]
+ msb.properties :Configuration => CONFIGURATION
+ msb.targets :Clean, :Build
+end
+
+
+task :app_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:app][:id])
+ copy_files FOLDERS[:app][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :cmds_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:cmds][:id])
+ copy_files FOLDERS[:cmds][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :domain_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:domain][:id])
+ copy_files FOLDERS[:domain][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :domain_svc_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:domain_svc][:id])
+ copy_files FOLDERS[:domain_svc][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :index_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:index][:id])
+ copy_files FOLDERS[:index][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :indexer_tests_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:indexer_tests][:id])
+ copy_files FOLDERS[:indexer_tests][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :infr_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:infr][:id])
+ copy_files FOLDERS[:infr][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :rm_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:rm][:id])
+ copy_files FOLDERS[:rm][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :specs_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:specs][:id])
+ copy_files FOLDERS[:specs][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :wpf_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:wpf][:id])
+ copy_files FOLDERS[:wpf][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+
+task :evtlist_output => [:msbuild] do
+ target = File.join(FOLDERS[:binaries], PROJECTS[:evtlist][:id])
+ copy_files FOLDERS[:evtlist][:out], "*.{xml,dll,pdb,config}", target
+ CLEAN.include(target)
+end
+
+task :output => [:app_output, :cmds_output, :domain_output, :domain_svc_output, :index_output, :indexer_tests_output, :infr_output, :rm_output, :specs_output, :wpf_output, :evtlist_output]
+task :nuspecs => [:cmds_nuspec]
+
+desc "Create a nuspec for 'Documently.Commands'"
+nuspec :cmds_nuspec do |nuspec|
+ nuspec.id = "#{PROJECTS[:cmds][:nuget_key]}"
+ nuspec.version = BUILD_VERSION
+ nuspec.authors = "#{PROJECTS[:cmds][:authors]}"
+ nuspec.description = "#{PROJECTS[:cmds][:description]}"
+ nuspec.title = "#{PROJECTS[:cmds][:title]}"
+ # nuspec.projectUrl = 'http://github.com/haf' # TODO: Set this for nuget generation
+ nuspec.language = "en-US"
+ nuspec.licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0" # TODO: set this for nuget generation
+ nuspec.requireLicenseAcceptance = "false"
+
+ nuspec.output_file = FILES[:cmds][:nuspec]
+ nuspec_copy(:cmds, "#{PROJECTS[:cmds][:id]}.{dll,pdb,xml}")
+end
+
+task :nugets => [:"env:release", :nuspecs, :cmds_nuget]
+
+desc "nuget pack 'Documently.Commands'"
+nugetpack :cmds_nuget do |nuget|
+ nuget.command = "#{COMMANDS[:nuget]}"
+ nuget.nuspec = "#{FILES[:cmds][:nuspec]}"
+ nuget.output = "#{FOLDERS[:nuget]}"
+end
+
+task :publish => [:"env:release", :cmds_nuget_push]
+
+desc "publishes (pushes) the nuget package 'Documently.Commands'"
+nugetpush :cmds_nuget_push do |nuget|
+ nuget.command = "#{COMMANDS[:nuget]}"
+ nuget.package = "#{File.join(FOLDERS[:nuget], PROJECTS[:cmds][:nuget_key] + "." + BUILD_VERSION + '.nupkg')}"
+ nuget.create_only = false
+end
+
+task :default => ["env:release", "assemblyinfo", "msbuild", "output", "nugets"]
View
226 buildscripts/environment.rb
@@ -0,0 +1,226 @@
+require "buildscripts/paths"
+require "buildscripts/project_details"
+require 'semver'
+
+namespace :env do
+
+ task :common do
+ # version management
+ fv = version SemVer.find.to_s
+ revision = (!fv[3] || fv[3] == 0) ? (ENV['BUILD_NUMBER'] || Time.now.strftime('%j%H')) : fv[3] # (day of year 0-265)(hour 00-24)
+
+ ENV['BUILD_VERSION'] = BUILD_VERSION = "#{ SemVer.new(fv[0], fv[1], fv[2]).format "%M.%m.%p" }.#{revision}"
+ puts "Assembly Version: #{BUILD_VERSION}."
+ puts "##teamcity[buildNumber '#{BUILD_VERSION}']" # tell teamcity our decision
+
+ # .net/mono configuration management
+ ENV['FRAMEWORK'] = FRAMEWORK = ENV['FRAMEWORK'] || (Rake::Win32::windows? ? "net40" : "mono28")
+ puts "Framework: #{FRAMEWORK}"
+ end
+
+ # configure the output directories
+ task :configure, [:str] do |_, args|
+ ENV['CONFIGURATION'] = CONFIGURATION = args[:str]
+ FOLDERS[:binaries] = File.join(FOLDERS[:build], FRAMEWORK, args[:str].downcase)
+ CLEAN.include(File.join(FOLDERS[:binaries], "*"))
+ end
+
+ task :set_dirs do
+
+
+ FOLDERS[:app][:out] = File.join(FOLDERS[:src], PROJECTS[:app][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:app][:out])
+
+ # for tests
+ FOLDERS[:app][:test_out] = File.join(FOLDERS[:src], PROJECTS[:app][:test_dir], 'bin', CONFIGURATION)
+ FILES[:app][:test] = File.join(FOLDERS[:app][:test_out], "#{PROJECTS[:app][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:cmds][:out] = File.join(FOLDERS[:src], PROJECTS[:cmds][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:cmds][:out])
+
+ # for tests
+ FOLDERS[:cmds][:test_out] = File.join(FOLDERS[:src], PROJECTS[:cmds][:test_dir], 'bin', CONFIGURATION)
+ FILES[:cmds][:test] = File.join(FOLDERS[:cmds][:test_out], "#{PROJECTS[:cmds][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:domain][:out] = File.join(FOLDERS[:src], PROJECTS[:domain][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:domain][:out])
+
+ # for tests
+ FOLDERS[:domain][:test_out] = File.join(FOLDERS[:src], PROJECTS[:domain][:test_dir], 'bin', CONFIGURATION)
+ FILES[:domain][:test] = File.join(FOLDERS[:domain][:test_out], "#{PROJECTS[:domain][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:domain_svc][:out] = File.join(FOLDERS[:src], PROJECTS[:domain_svc][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:domain_svc][:out])
+
+ # for tests
+ FOLDERS[:domain_svc][:test_out] = File.join(FOLDERS[:src], PROJECTS[:domain_svc][:test_dir], 'bin', CONFIGURATION)
+ FILES[:domain_svc][:test] = File.join(FOLDERS[:domain_svc][:test_out], "#{PROJECTS[:domain_svc][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:index][:out] = File.join(FOLDERS[:src], PROJECTS[:index][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:index][:out])
+
+ # for tests
+ FOLDERS[:index][:test_out] = File.join(FOLDERS[:src], PROJECTS[:index][:test_dir], 'bin', CONFIGURATION)
+ FILES[:index][:test] = File.join(FOLDERS[:index][:test_out], "#{PROJECTS[:index][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:indexer_tests][:out] = File.join(FOLDERS[:src], PROJECTS[:indexer_tests][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:indexer_tests][:out])
+
+ # for tests
+ FOLDERS[:indexer_tests][:test_out] = File.join(FOLDERS[:src], PROJECTS[:indexer_tests][:test_dir], 'bin', CONFIGURATION)
+ FILES[:indexer_tests][:test] = File.join(FOLDERS[:indexer_tests][:test_out], "#{PROJECTS[:indexer_tests][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:infr][:out] = File.join(FOLDERS[:src], PROJECTS[:infr][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:infr][:out])
+
+ # for tests
+ FOLDERS[:infr][:test_out] = File.join(FOLDERS[:src], PROJECTS[:infr][:test_dir], 'bin', CONFIGURATION)
+ FILES[:infr][:test] = File.join(FOLDERS[:infr][:test_out], "#{PROJECTS[:infr][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:rm][:out] = File.join(FOLDERS[:src], PROJECTS[:rm][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:rm][:out])
+
+ # for tests
+ FOLDERS[:rm][:test_out] = File.join(FOLDERS[:src], PROJECTS[:rm][:test_dir], 'bin', CONFIGURATION)
+ FILES[:rm][:test] = File.join(FOLDERS[:rm][:test_out], "#{PROJECTS[:rm][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:specs][:out] = File.join(FOLDERS[:src], PROJECTS[:specs][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:specs][:out])
+
+ # for tests
+ FOLDERS[:specs][:test_out] = File.join(FOLDERS[:src], PROJECTS[:specs][:test_dir], 'bin', CONFIGURATION)
+ FILES[:specs][:test] = File.join(FOLDERS[:specs][:test_out], "#{PROJECTS[:specs][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:wpf][:out] = File.join(FOLDERS[:src], PROJECTS[:wpf][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:wpf][:out])
+
+ # for tests
+ FOLDERS[:wpf][:test_out] = File.join(FOLDERS[:src], PROJECTS[:wpf][:test_dir], 'bin', CONFIGURATION)
+ FILES[:wpf][:test] = File.join(FOLDERS[:wpf][:test_out], "#{PROJECTS[:wpf][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+
+ FOLDERS[:evtlist][:out] = File.join(FOLDERS[:src], PROJECTS[:evtlist][:dir], 'bin', CONFIGURATION)
+ CLEAN.include(FOLDERS[:evtlist][:out])
+
+ # for tests
+ FOLDERS[:evtlist][:test_out] = File.join(FOLDERS[:src], PROJECTS[:evtlist][:test_dir], 'bin', CONFIGURATION)
+ FILES[:evtlist][:test] = File.join(FOLDERS[:evtlist][:test_out], "#{PROJECTS[:evtlist][:test_dir]}.dll")
+ CLEAN.include(FOLDERS[:test_out])
+
+ end
+
+ task :dir_tasks do
+ all_dirs = []
+
+ [:build, :tools, :tests, :nuget, :nuspec].each do |dir|
+ directory FOLDERS[dir]
+ all_dirs << FOLDERS[dir]
+ end
+
+ [:out, :nuspec].each do |dir|
+ [:app, :cmds, :domain, :domain_svc, :index, :indexer_tests, :infr, :rm, :specs, :wpf, :evtlist].each{ |k|
+ directory FOLDERS[k][dir]
+ all_dirs << FOLDERS[k][dir]
+ }
+ end
+
+ all_dirs.each do |d|
+ Rake::Task[d].invoke
+ end
+ end
+
+ # DEBUG/RELEASE
+
+ desc "set debug environment variables"
+ task :debug => [:common] do
+ Rake::Task["env:configure"].invoke('Debug')
+ Rake::Task["env:set_dirs"].invoke
+ Rake::Task["env:dir_tasks"].invoke
+ end
+
+ desc "set release environment variables"
+ task :release => [:common] do
+ Rake::Task["env:configure"].invoke('Release')
+ Rake::Task["env:set_dirs"].invoke
+ Rake::Task["env:dir_tasks"].invoke
+ end
+
+ # FRAMEWORKS
+
+ desc "set net40 framework"
+ task :net40 do
+ ENV['FRAMEWORK'] = 'net40'
+ end
+
+ desc "set net35 framework"
+ task :net35 do
+ ENV['FRAMEWORK'] = 'net35'
+ end
+
+ desc "set net20 framework"
+ task :net20 do
+ ENV['FRAMEWORK'] = 'net20'
+ end
+
+ desc "set mono28 framework"
+ task :mono28 do
+ ENV['FRAMEWORK'] = 'mono28'
+ end
+
+ desc "set mono30 framework"
+ task :net30 do
+ ENV['FRAMEWORK'] = 'mono30'
+ end
+
+ # ENVIRONMENT VARS FOR PRODUCT RELEASES
+
+ desc "set GA envionment variables"
+ task :ga do
+ puts "##teamcity[progressMessage 'Setting environment variables for GA']"
+ ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "4000"
+ end
+
+ desc "set release candidate environment variables"
+ task :rc, [:number] do |t, args|
+ puts "##teamcity[progressMessage 'Setting environment variables for Release Candidate']"
+ arg_num = args[:number].to_i
+ num = arg_num != 0 ? arg_num : 1
+ ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{3000 + num}"
+ end
+
+ desc "set beta-environment variables"
+ task :beta, [:number] do |t, args|
+ puts "##teamcity[progressMessage 'Setting environment variables for Beta']"
+ arg_num = args[:number].to_i
+ num = arg_num != 0 ? arg_num : 1
+ ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{2000 + num}"
+ end
+
+ desc "set alpha environment variables"
+ task :alpha, [:number] do |t, args|
+ puts "##teamcity[progressMessage 'Setting environment variables for Alpha']"
+ arg_num = args[:number].to_i
+ num = arg_num != 0 ? arg_num : 1
+
+ ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{1000 + num}"
+ end
+end
View
151 buildscripts/paths.rb
@@ -0,0 +1,151 @@
+root_folder = File.expand_path("#{File.dirname(__FILE__)}/..")
+require "buildscripts/project_details"
+
+# The folders array denoting where to place build artifacts
+
+folders = {
+ :root => root_folder,
+ :src => "src",
+ :build => "build",
+ :binaries => "placeholder - environment.rb sets this depending on target",
+ :tools => "tools",
+ :tests => "build/tests",
+ :nuget => "build/nuget",
+ :nuspec => "build/nuspec"
+}
+
+FOLDERS = folders.merge({
+
+ :app => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:app][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :cmds => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:cmds][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :domain => {
+ :test_dir => 'Documently.Domain.Tests',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:domain][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :domain_svc => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:domain_svc][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :index => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:index][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :indexer_tests => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:indexer_tests][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :infr => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:infr][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :rm => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:rm][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :specs => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:specs][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :wpf => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:wpf][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+ :evtlist => {
+ :test_dir => '',
+ :nuspec => "#{File.join(folders[:nuspec], PROJECTS[:evtlist][:nuget_key])}",
+ :out => 'placeholder - environment.rb will sets this',
+ :test_out => 'placeholder - environment.rb sets this'
+ },
+
+})
+
+FILES = {
+ :sln => "src/Documently.sln",
+
+ :app => {
+ :nuspec => File.join(FOLDERS[:app][:nuspec], "#{PROJECTS[:app][:nuget_key]}.nuspec")
+ },
+
+ :cmds => {
+ :nuspec => File.join(FOLDERS[:cmds][:nuspec], "#{PROJECTS[:cmds][:nuget_key]}.nuspec")
+ },
+
+ :domain => {
+ :nuspec => File.join(FOLDERS[:domain][:nuspec], "#{PROJECTS[:domain][:nuget_key]}.nuspec")
+ },
+
+ :domain_svc => {
+ :nuspec => File.join(FOLDERS[:domain_svc][:nuspec], "#{PROJECTS[:domain_svc][:nuget_key]}.nuspec")
+ },
+
+ :index => {
+ :nuspec => File.join(FOLDERS[:index][:nuspec], "#{PROJECTS[:index][:nuget_key]}.nuspec")
+ },
+
+ :indexer_tests => {
+ :nuspec => File.join(FOLDERS[:indexer_tests][:nuspec], "#{PROJECTS[:indexer_tests][:nuget_key]}.nuspec")
+ },
+
+ :infr => {
+ :nuspec => File.join(FOLDERS[:infr][:nuspec], "#{PROJECTS[:infr][:nuget_key]}.nuspec")
+ },
+
+ :rm => {
+ :nuspec => File.join(FOLDERS[:rm][:nuspec], "#{PROJECTS[:rm][:nuget_key]}.nuspec")
+ },
+
+ :specs => {
+ :nuspec => File.join(FOLDERS[:specs][:nuspec], "#{PROJECTS[:specs][:nuget_key]}.nuspec")
+ },
+
+ :wpf => {
+ :nuspec => File.join(FOLDERS[:wpf][:nuspec], "#{PROJECTS[:wpf][:nuget_key]}.nuspec")
+ },
+
+ :evtlist => {
+ :nuspec => File.join(FOLDERS[:evtlist][:nuspec], "#{PROJECTS[:evtlist][:nuget_key]}.nuspec")
+ },
+
+}
+
+COMMANDS = {
+ :nuget => File.join(FOLDERS[:tools], "NuGet.exe"),
+ :ilmerge => File.join(FOLDERS[:tools], "ILMerge.exe")
+ # nunit etc
+}
View
25 buildscripts/project_details.rb
@@ -0,0 +1,25 @@
+PROJECTS = {
+
+ :app => {:title=>"Documently.App", :id=>"Documently.App", :dir=>"Documently.App", :test_dir=>"", :description=>"Missing description for Documently.App", :authors=>nil, :company=>nil, :copyright=>"Copyright (c)", :nuget_key=>"", :ruby_key=>"app", :guid=>"4f4f5d60-e97f-4793-b2b2-e3a9f60cf082", :dependencies=>[], :create_package=>false},
+
+ :cmds => {:title=>"Documently.Commands", :id=>"Documently.Commands", :dir=>"Documently.Commands", :test_dir=>"", :description=>"Commands that can be sent to the domain service", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2011-2012", :nuget_key=>"Documently.Commands", :ruby_key=>"cmds", :guid=>"711948dc-14c0-4026-ac5d-d6d766048d82", :dependencies=>[], :create_package=>true},
+
+ :domain => {:title=>"Documently.Domain", :id=>"Documently.Domain", :dir=>"Documently.Domain", :test_dir=>"Documently.Domain.Tests", :description=>"Domain Model", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2011-2012", :nuget_key=>"", :ruby_key=>"domain", :guid=>"a8a0b3b7-860d-4669-8e27-2e779330376d", :dependencies=>[], :create_package=>false},
+
+ :domain_svc => {:title=>"Documently.Domain.Service", :id=>"Documently.Domain.Service", :dir=>"Documently.Domain.Service", :test_dir=>"", :description=>"Domain Service", :authors=>"Henrik", :company=>"Jayay", :copyright=>"Henrik", :nuget_key=>"", :ruby_key=>"domain_svc", :guid=>"5139cdd7-038b-4329-9f63-e490a484abf7", :dependencies=>[], :create_package=>false},
+
+ :index => {:title=>"Documently.Indexer", :id=>"Documently.Indexer", :dir=>"Documently.Indexer", :test_dir=>"", :description=>"SVM F# indexer", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik Feldt 2012", :nuget_key=>"", :ruby_key=>"index", :guid=>"bd6d2bec-9f74-4ae6-8663-5cd81b7db86d", :dependencies=>[], :create_package=>false},
+
+ :indexer_tests => {:title=>"Documently.Indexer.Tests", :id=>"Documently.Indexer.Tests", :dir=>"Documently.Indexer.Tests", :test_dir=>"", :description=>"Missing description for Documently.Indexer.Tests", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2012", :nuget_key=>"", :ruby_key=>"indexer_tests", :guid=>"ce3966cf-12fd-4080-a35b-1f03c2977a76", :dependencies=>[], :create_package=>false},
+
+ :infr => {:title=>"Documently.Infrastructure", :id=>"Documently.Infrastructure", :dir=>"Documently.Infrastructure", :test_dir=>"", :description=>"Missing description for Documently.Infrastructure", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2012", :nuget_key=>"", :ruby_key=>"infr", :guid=>"d11f9e3f-bf79-4b06-8f3e-43590d2d0e77", :dependencies=>[], :create_package=>false},
+
+ :rm => {:title=>"Documently.ReadModel", :id=>"Documently.ReadModel", :dir=>"Documently.ReadModel", :test_dir=>"", :description=>"Missing description for Documently.ReadModel", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2012", :nuget_key=>"", :ruby_key=>"rm", :guid=>"875c9270-1d30-4564-9639-3f3105c38c2e", :dependencies=>[], :create_package=>false},
+
+ :specs => {:title=>"Documently.Specs", :id=>"Documently.Specs", :dir=>"Documently.Specs", :test_dir=>"", :description=>"Specifications and unit tests", :authors=>"Henrik", :company=>"Jayway 2012", :copyright=>"Henrik Feldt 2012", :nuget_key=>"", :ruby_key=>"specs", :guid=>"29d2ac24-9c48-4c06-9a37-48a8e6da28d9", :dependencies=>[], :create_package=>false},
+
+ :wpf => {:title=>"Documently.WpfClient", :id=>"Documently.WpfClient", :dir=>"Documently.WpfClient", :test_dir=>"", :description=>"Missing description for Documently.WpfClient", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik 2012", :nuget_key=>"", :ruby_key=>"wpf", :guid=>"40a83dfc-0ca4-4db0-a267-ee803ef7ad5f", :dependencies=>[], :create_package=>false},
+
+ :evtlist => {:title=>"DomainEventListener", :id=>"DomainEventListener", :dir=>"DomainEventListener", :test_dir=>"", :description=>"Missing description for DomainEventListener", :authors=>"Henrik", :company=>"Jayway", :copyright=>"Henrik ", :nuget_key=>"", :ruby_key=>"evtlist", :guid=>"18451a12-69fb-4a84-acf3-9448e9954186", :dependencies=>[], :create_package=>false},
+
+}
View
42 buildscripts/utils.rb
@@ -0,0 +1,42 @@
+require 'fileutils'
+
+def commit_data
+ begin
+ commit = `git log -1 --pretty=format:%H`
+ git_date = `git log -1 --date=iso --pretty=format:%ad`
+ commit_date = DateTime.parse( git_date ).strftime("%Y-%m-%d %H%M%S")
+ rescue
+ commit = "git unavailable"
+ commit_date = Time.new.strftime("%Y-%m-%d %H%M%S")
+ end
+ [commit, commit_date]
+end
+
+ # copy from the key's data using the glob pattern
+def nuspec_copy(key, glob)
+ puts "key: #{key}, glob: #{glob}, proj dir: #{PROJECTS[key][:dir]}"
+ FileList[File.join(FOLDERS[:binaries], PROJECTS[key][:dir], glob)].collect{ |f|
+ to = File.join( FOLDERS[:"#{key}"][:nuspec], "lib", FRAMEWORK )
+ FileUtils.mkdir_p to
+ cp f, to
+ # return the file name and its extension:
+ File.join(FRAMEWORK, File.basename(f))
+ }
+end
+
+def copy_files(from_dir, file_pattern, out_dir)
+ puts "copying from #{out_dir}"
+ FileUtils.mkdir_p out_dir unless FileTest.exists?(out_dir)
+ Dir.glob(File.join(from_dir, file_pattern)){|file|
+ copy(file, out_dir) if File.file?(file)
+ }
+end
+
+def versions(str)
+ str.split(/\r\n|\n/).map{|s|version(s)}.compact.sort
+end
+
+def version(str)
+ ver = /v?(\d+)\.(\d+)\.(\d+)\.?(\d+)?/i.match(str).to_a()
+ ver[1,4].map{|s|s.to_i} unless ver == nil or ver.empty?
+end
View
1 src/Documently-CQRS.sln.DotSettings.user
@@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
+ <s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/NUnitProvider/UseAddins/@EntryValue">Never</s:String>
<s:Boolean x:Key="/Default/Housekeeping/SolutionSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/UnitTestingMru/UnitTestSessionPersistentData/=215550D59E604DE58E6E383636138AEA/@KeyIndexDefined">True</s:Boolean>
View
70 src/Documently.App/Documently.App.csproj
@@ -83,72 +83,66 @@
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<ItemGroup>
- <Reference Include="AsyncCtpLibrary">
- <HintPath>..\packages\RavenDB.1.0.499\lib\net40\AsyncCtpLibrary.dll</HintPath>
+ <Reference Include="AsyncCtpLibrary, Version=1.0.4107.18181, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <HintPath>..\packages\RavenDB.1.0.701\lib\net40\AsyncCtpLibrary.dll</HintPath>
</Reference>
- <Reference Include="Castle.Core, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Castle.Core.2.5.2\lib\NET35\Castle.Core.dll</HintPath>
+ <HintPath>..\packages\Castle.Core.3.0.0.4001\lib\net40-client\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Windsor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Castle.Windsor.2.5.4\lib\net40\Castle.Windsor.dll</HintPath>
+ <HintPath>..\packages\Castle.Windsor.3.0.0.4001\lib\net40\Castle.Windsor.dll</HintPath>
</Reference>
- <Reference Include="CommonDomain, Version=1.3.0.0, Culture=neutral, PublicKeyToken=ec37a15dc44010cd, processorArchitecture=MSIL">
+ <Reference Include="CommonDomain, Version=1.4.0.0, Culture=neutral, PublicKeyToken=ec37a15dc44010cd, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\CommonDomain.1.2.2\lib\net40\CommonDomain.dll</HintPath>
+ <HintPath>..\packages\CommonDomain.1.4.0\lib\net40\CommonDomain.dll</HintPath>
</Reference>
<Reference Include="EventStore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7735eb81c0bd9948, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\EventStore.3.0.11293.43\lib\net40\EventStore.dll</HintPath>
- </Reference>
- <Reference Include="log4net">
- <HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
+ <HintPath>..\packages\EventStore.3.0.11326.44\lib\net40\EventStore.dll</HintPath>
</Reference>
- <Reference Include="log4net.RabbitMQ">
- <HintPath>..\packages\log4net.RabbitMQAppender.0.1.4\lib\net40\log4net.RabbitMQ.dll</HintPath>
- </Reference>
- <Reference Include="Magnum, Version=2.0.0.2, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Magnum, Version=2.0.0.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Magnum.2.0.0.2\lib\NET40\Magnum.dll</HintPath>
+ <HintPath>..\packages\Magnum.2.0.0.4\lib\NET40\Magnum.dll</HintPath>
</Reference>
- <Reference Include="MassTransit, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.2.0.1.0\lib\net40\MassTransit.dll</HintPath>
+ <HintPath>..\packages\MassTransit.2.1.0\lib\net40\MassTransit.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.Transports.MSMQ, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.Transports.MSMQ, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.2.0.1.0\lib\net40\MassTransit.Transports.MSMQ.dll</HintPath>
+ <HintPath>..\packages\MassTransit.2.1.0\lib\net40\MassTransit.Transports.MSMQ.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.Transports.RabbitMq, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.Transports.RabbitMq, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.RabbitMQ.2.0.1.0\lib\net40\MassTransit.Transports.RabbitMq.dll</HintPath>
+ <HintPath>..\packages\MassTransit.RabbitMQ.2.1.0\lib\net40\MassTransit.Transports.RabbitMq.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.WindsorIntegration, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.WindsorIntegration, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.CastleWindsor.2.0.1.0\lib\net40\MassTransit.WindsorIntegration.dll</HintPath>
+ <HintPath>..\packages\MassTransit.CastleWindsor.2.1.0\lib\net40\MassTransit.WindsorIntegration.dll</HintPath>
</Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\packages\Newtonsoft.Json.4.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
+ <Reference Include="Newtonsoft.Json, Version=4.0.8.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\Newtonsoft.Json.4.0.8\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
</Reference>
- <Reference Include="RabbitMQ.Client, Version=2.6.1.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce, processorArchitecture=MSIL">
+ <Reference Include="RabbitMQ.Client, Version=2.7.1.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\RabbitMQ.Client.2.6.1\lib\net30\RabbitMQ.Client.dll</HintPath>
+ <HintPath>..\packages\RabbitMQ.Client.2.7.1\lib\net30\RabbitMQ.Client.dll</HintPath>
</Reference>
- <Reference Include="Raven.Abstractions">
- <HintPath>..\packages\RavenDB.1.0.499\lib\net40\Raven.Abstractions.dll</HintPath>
+ <Reference Include="Raven.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+ <HintPath>..\packages\RavenDB.1.0.701\lib\net40\Raven.Abstractions.dll</HintPath>
</Reference>
- <Reference Include="Raven.Client.Debug">
- <HintPath>..\packages\RavenDB.1.0.499\lib\net40\Raven.Client.Debug.dll</HintPath>
+ <Reference Include="Raven.Client.Debug, Version=1.0.0.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+ <HintPath>..\packages\RavenDB.1.0.701\lib\net40\Raven.Client.Debug.dll</HintPath>
</Reference>
- <Reference Include="Raven.Client.Lightweight">
- <HintPath>..\packages\RavenDB.1.0.499\lib\net40\Raven.Client.Lightweight.dll</HintPath>
+ <Reference Include="Raven.Client.Lightweight, Version=1.0.0.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+ <HintPath>..\packages\RavenDB.1.0.701\lib\net40\Raven.Client.Lightweight.dll</HintPath>
</Reference>
- <Reference Include="Raven.Client.MvcIntegration">
- <HintPath>..\packages\RavenDB.1.0.499\lib\net40\Raven.Client.MvcIntegration.dll</HintPath>
+ <Reference Include="Raven.Client.MvcIntegration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\packages\RavenDB.1.0.701\lib\net40\Raven.Client.MvcIntegration.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
View
26 src/Documently.App/Program.cs
@@ -8,22 +8,22 @@
using Documently.ReadModel;
using Magnum;
using MassTransit;
+using NLog;
+using NLog.Config;
using Raven.Client;
-using log4net;
-using log4net.Config;
namespace Documently.App
{
internal class Program
{
- private static readonly ILog _Logger = LogManager.GetLogger(typeof (Program));
+ private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
- private IWindsorContainer _Container;
+ private IWindsorContainer _container;
private static void Main()
{
Description();
- XmlConfigurator.Configure();
+ SimpleConfigurator.ConfigureForConsoleLogging();
var p = new Program();
try { p.Start(); }
@@ -34,15 +34,15 @@ private void Start()
{
try
{
- _Logger.Info("installing and setting up components");
- _Container = new WindsorContainer()
+ _logger.Info("installing and setting up components");
+ _container = new WindsorContainer()
.Install(
new RavenDbServerInstaller(),
new ReadRepositoryInstaller(),
new BusInstaller("rabbitmq://localhost/Documently.App"),
new EventStoreInstaller());
- _Container.Register(Component.For<IWindsorContainer>().Instance(_Container));
+ _container.Register(Component.For<IWindsorContainer>().Instance(_container));
var customerId = CombGuid.Generate();
@@ -66,11 +66,11 @@ private void Start()
}
catch (WebException ex)
{
- _Logger.Error(@"Unable to connect to RavenDB Server. Have you started 'RavenDB\Server\Raven.Server.exe'?", ex);
+ _logger.Error(@"Unable to connect to RavenDB Server. Have you started 'RavenDB\Server\Raven.Server.exe'?", ex);
}
catch (Exception ex)
{
- _Logger.Error("exception thrown", ex);
+ _logger.Error("exception thrown", ex);
}
Console.WriteLine("Press any key to finish.");
@@ -87,7 +87,7 @@ private static void Description()
private void ShowCustomerListView()
{
- var store = _Container.Resolve<IDocumentStore>();
+ var store = _container.Resolve<IDocumentStore>();
using (var session = store.OpenSession())
{
@@ -113,14 +113,14 @@ private void RelocateCustomer(Guid customerId)
private IEndpoint GetDomainService()
{
- var bus = _Container.Resolve<IServiceBus>();
+ var bus = _container.Resolve<IServiceBus>();
var domainService = bus.GetEndpoint(new Uri(Keys.DomainServiceEndpoint));
return domainService;
}
private void Stop()
{
- _Container.Dispose();
+ _container.Dispose();
}
}
}
View
8 src/Documently.App/app.config
@@ -49,11 +49,15 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RabbitMQ.Client" publicKeyToken="89e7d7c5feba84ce" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.6.1.0" newVersion="2.6.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-2.7.1.0" newVersion="2.7.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.8.0" newVersion="4.0.8.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
View
24 src/Documently.App/packages.config
@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Castle.Core" version="2.5.2" />
- <package id="Castle.Windsor" version="2.5.4" />
- <package id="CommonDomain" version="1.2.2" />
- <package id="EventStore" version="3.0.11293.43" />
+ <package id="Castle.Core" version="3.0.0.4001" />
+ <package id="Castle.Windsor" version="3.0.0.4001" />
+ <package id="CommonDomain" version="1.4.0" />
+ <package id="EventStore" version="3.0.11326.44" />
<package id="EventStore.Persistence.Raven" version="2.0.11157" />
- <package id="log4net" version="1.2.10" />
- <package id="log4net.RabbitMQAppender" version="0.1.4" />
- <package id="Magnum" version="2.0.0.2" />
- <package id="MassTransit" version="2.0.1.0" />
- <package id="MassTransit.CastleWindsor" version="2.0.1.0" />
- <package id="MassTransit.RabbitMQ" version="2.0.1.0" />
- <package id="Newtonsoft.Json" version="4.0.2" />
+ <package id="Magnum" version="2.0.0.4" />
+ <package id="MassTransit" version="2.1.0" />
+ <package id="MassTransit.CastleWindsor" version="2.1.0" />
+ <package id="MassTransit.RabbitMQ" version="2.1.0" />
+ <package id="Newtonsoft.Json" version="4.0.8" />
<package id="NLog" version="2.0.0.2000" />
- <package id="RabbitMQ.Client" version="2.6.1" />
+ <package id="RabbitMQ.Client" version="2.7.1" />
<package id="Raven.Abstractions" version="1.0" />
<package id="Raven.Client.Lightweight" version="1.0.3" />
<package id="Raven.Json" version="1.0.0" />
<package id="Raven.MissingBitsFromClientProfile" version="1.0.1" />
- <package id="RavenDB" version="1.0.499" />
+ <package id="RavenDB" version="1.0.701" />
</packages>
View
21 src/Documently.Commands/Command.cs
@@ -2,24 +2,9 @@
namespace Documently.Commands
{
- public abstract class Command
+ public interface Command
{
- public Guid Id { get; protected set; }
- public int Version { get; protected set; }
-
- protected Command()
- {
- }
-
- protected Command(Guid id)
- {
- Id = id;
- }
-
- protected Command(Guid id, int version)
- {
- Id = id;
- Version = version;
- }
+ Guid AggregateId { get; set; }
+ int Version { get; set; }
}
}
View
12 src/Documently.Commands/CreateDocumentMetaData.cs
@@ -5,19 +5,17 @@ namespace Documently.Commands
[Serializable]
public class CreateDocumentMetaData : Command
{
- /// <summary> for serialization </summary>
- [Obsolete("for serialization")]
- protected CreateDocumentMetaData()
- {
- }
-
- public CreateDocumentMetaData(Guid id, string title, DateTime utcTime) : base(id)
+ public CreateDocumentMetaData(Guid arId, string title, DateTime utcTime)
{
Title = title;
UtcTime = utcTime;
+ AggregateId = arId;
}
public string Title { get; protected set; }
public DateTime UtcTime { get; protected set; }
+
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
}
View
7 src/Documently.Commands/CreateNewCustomer.cs
@@ -20,16 +20,19 @@ protected CreateNewCustomer()
{
}
- public CreateNewCustomer(Guid id, string customerName, string street, string streetNumber, string postalCode,
+ public CreateNewCustomer(Guid arId, string customerName, string street, string streetNumber, string postalCode,
string city, string phoneNumber)
- : base(id)
{
CustomerName = customerName;
Street = street;
StreetNumber = streetNumber;
PostalCode = postalCode;
City = city;
PhoneNumber = phoneNumber;
+ AggregateId = arId;
}
+
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
}
View
4 src/Documently.Commands/CreateNewDocumentCollection.cs
@@ -13,10 +13,12 @@ protected CreateNewDocumentCollection()
public CreateNewDocumentCollection(Guid id, string name)
{
- Id = id;
+ AggregateId = id;
Name = name;
}
public string Name { get; protected set; }
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
}
View
14 ...mmands/AssociateDocumentWithCollection.cs → ...taData/AssociateDocumentWithCollection.cs
@@ -1,21 +1,19 @@
using System;
-namespace Documently.Commands
+namespace Documently.Commands.DocumentMetaData
{
[Serializable]
public class AssociateDocumentWithCollection : Command
{
public Guid CollectionId { get; protected set; }
- /// <summary> for serialization </summary>
- [Obsolete("for serialization")]
- protected AssociateDocumentWithCollection()
- {
- }
-
- public AssociateDocumentWithCollection(Guid docId, Guid collectionId) : base(docId)
+ public AssociateDocumentWithCollection(Guid docId, Guid collectionId)
{
+ AggregateId = docId;
CollectionId = collectionId;
}
+
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
}
View
11 src/Documently.Commands/Documently.Commands.csproj
@@ -31,15 +31,15 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="FluentValidation, Version=3.1.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66, processorArchitecture=MSIL">
+ <Reference Include="FluentValidation, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a82054b837897c66, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\FluentValidation.3.1.0.0\lib\Net40\FluentValidation.dll</HintPath>
+ <HintPath>..\packages\FluentValidation.3.2.0.0\lib\Net40\FluentValidation.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
- <Compile Include="AssociateDocumentWithCollection.cs" />
+ <Compile Include="DocumentMetaData\AssociateDocumentWithCollection.cs" />
<Compile Include="Command.cs" />
<Compile Include="CreateNewCustomer.cs" />
<Compile Include="CreateNewDocumentCollection.cs" />
@@ -48,6 +48,11 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RelocateTheCustomer.cs" />
<Compile Include="CreateDocumentMetaData.cs" />
+ <Compile Include="ShareDocument.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Customer\" />
+ <Folder Include="DocumentCollection\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
View
11 src/Documently.Commands/InitializeDocumentIndexing.cs
@@ -5,17 +5,14 @@ namespace Documently.Commands
[Serializable]
public class InitializeDocumentIndexing : Command
{
- /// <summary> for serialization </summary>
- [Obsolete("for serialization")]
- protected InitializeDocumentIndexing()
- {
- }
-
- public InitializeDocumentIndexing(Guid aggregateId, Guid blobId) : base(aggregateId)
+ public InitializeDocumentIndexing(Guid aggregateId, Guid blobId)
{
+ AggregateId = aggregateId;
BlobId = blobId;
}
public Guid BlobId { get; protected set; }
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
}
View
13 src/Documently.Commands/RelocateTheCustomer.cs
@@ -11,20 +11,17 @@ public class RelocateTheCustomer : Command
public string PostalCode { get; set; }
public string City { get; set; }
- /// <summary> for serialization </summary>
- [Obsolete("for serialization")]
- protected RelocateTheCustomer()
- {
- }
-
- public RelocateTheCustomer(Guid id, string street, string streetNumber, string postalCode, string city)
- : base(id)
+ public RelocateTheCustomer(Guid arId, string street, string streetNumber, string postalCode, string city)
{
+ AggregateId = arId;
Street = street;
Streetnumber = streetNumber;
PostalCode = postalCode;
City = city;
}
+
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
}
/// <summary>
View
20 src/Documently.Commands/ShareDocument.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace Documently.Commands
+{
+ [Serializable]
+ public class ShareDocument : Command
+ {
+ public ShareDocument(Guid arId, int version, IEnumerable<int> userIds)
+ {
+ UserIds = userIds;
+ AggregateId = arId;
+ Version = version;
+ }
+
+ public IEnumerable<int> UserIds { get; protected set; }
+ public Guid AggregateId { get; set; }
+ public int Version { get; set; }
+ }
+}
View
2 src/Documently.Commands/packages.config
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="FluentValidation" version="3.1.0.0" />
+ <package id="FluentValidation" version="3.2.0.0" />
</packages>
View
51 src/Documently.Domain.Service/Documently.Domain.Service.csproj
@@ -35,47 +35,49 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Castle.Core, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Castle.Core.2.5.2\lib\NET35\Castle.Core.dll</HintPath>
+ <HintPath>..\packages\Castle.Core.3.0.0.4001\lib\net40-client\Castle.Core.dll</HintPath>
</Reference>
- <Reference Include="Castle.Windsor, Version=2.5.1.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <Reference Include="Castle.Windsor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Castle.Windsor.2.5.4\lib\net40\Castle.Windsor.dll</HintPath>
+ <HintPath>..\packages\Castle.Windsor.3.0.0.4001\lib\net40\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="EventStore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7735eb81c0bd9948, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\EventStore.3.0.11293.43\lib\net40\EventStore.dll</HintPath>
+ <HintPath>..\packages\EventStore.3.0.11326.44\lib\net40\EventStore.dll</HintPath>
</Reference>
<Reference Include="log4net">
- <HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
- </Reference>
- <Reference Include="log4net.RabbitMQ">
- <HintPath>..\packages\log4net.RabbitMQAppender.0.1.4\lib\net40\log4net.RabbitMQ.dll</HintPath>
+ <HintPath>..\packages\log4net.1.2.11\lib\net40-full\log4net.dll</HintPath>
</Reference>
- <Reference Include="Magnum, Version=2.0.0.2, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Magnum, Version=2.0.0.4, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\Magnum.2.0.0.2\lib\NET40\Magnum.dll</HintPath>
+ <HintPath>..\packages\Magnum.2.0.0.4\lib\NET40\Magnum.dll</HintPath>
</Reference>
- <Reference Include="MassTransit, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.2.0.1.0\lib\net40\MassTransit.dll</HintPath>
+ <HintPath>..\packages\MassTransit.2.1.0\lib\net40\MassTransit.dll</HintPath>
+ </Reference>
+ <Reference Include="MassTransit.NLogIntegration">
+ <HintPath>..\packages\MassTransit.NLog.2.1.0\lib\net40\MassTransit.NLogIntegration.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.Transports.MSMQ, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.Transports.MSMQ, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.2.0.1.0\lib\net40\MassTransit.Transports.MSMQ.dll</HintPath>
+ <HintPath>..\packages\MassTransit.2.1.0\lib\net40\MassTransit.Transports.MSMQ.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.Transports.RabbitMq, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.Transports.RabbitMq, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.RabbitMQ.2.0.1.0\lib\net40\MassTransit.Transports.RabbitMq.dll</HintPath>
+ <HintPath>..\packages\MassTransit.RabbitMQ.2.1.0\lib\net40\MassTransit.Transports.RabbitMq.dll</HintPath>
</Reference>
- <Reference Include="MassTransit.WindsorIntegration, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="MassTransit.WindsorIntegration, Version=2.1.408.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\MassTransit.CastleWindsor.2.0.1.0\lib\net40\MassTransit.WindsorIntegration.dll</HintPath>
+ <HintPath>..\packages\MassTransit.CastleWindsor.2.1.0\lib\net40\MassTransit.WindsorIntegration.dll</HintPath>
</Reference>
- <Reference Include="RabbitMQ.Client, Version=2.6.1.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce, processorArchitecture=MSIL">
+ <Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
+ <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
+ </Reference>
+ <Reference Include="RabbitMQ.Client, Version=2.7.1.0, Culture=neutral, PublicKeyToken=89e7d7c5feba84ce, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\RabbitMQ.Client.2.6.1\lib\net30\RabbitMQ.Client.dll</HintPath>
+ <HintPath>..\packages\RabbitMQ.Client.2.7.1\lib\net30\RabbitMQ.Client.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
@@ -85,8 +87,9 @@
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
- <Reference Include="Topshelf">
- <HintPath>..\packages\Topshelf.2.2.2.0\lib\NET40\Topshelf.dll</HintPath>
+ <Reference Include="Topshelf, Version=2.2.3.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\packages\TopShelf.2.2.3.0\lib\NET40\Topshelf.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
View
15 src/Documently.Domain.Service/Program.cs
@@ -4,16 +4,15 @@
using Documently.Infrastructure;
using Documently.Infrastructure.Installers;
using MassTransit;
+using NLog;
using Topshelf;
-using log4net;
using log4net.Config;
namespace Documently.Domain.Service
{
class Program
{
- private static readonly ILog _Logger = LogManager.GetLogger(typeof (Program));
-
+ private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
private IWindsorContainer _Container;
private IServiceBus _Bus;
@@ -38,8 +37,10 @@ public static void Main(string[] args)
private void Start()
{
- XmlConfigurator.Configure();
- _Logger.Info("setting up domain service, installing components");
+ BasicConfigurator.Configure(); // for TopShelf until it upgrades
+ NLog.Config.SimpleConfigurator.ConfigureForConsoleLogging();
+
+ _logger.Info("setting up domain service, installing components");
_Container = new WindsorContainer()
.Install(
@@ -52,12 +53,12 @@ private void Start()
_Container.Register(Component.For<IWindsorContainer>().Instance(_Container));
_Bus = _Container.Resolve<IServiceBus>();
- _Logger.Info("application configured, started running");
+ _logger.Info("application configured, started running");
}
private void Stop()
{
- _Logger.Info("shutting down Domain Service");
+ _logger.Info("shutting down Domain Service");
_Container.Release(_Bus);
_Container.Dispose();
}
View
45 src/Documently.Domain.Service/app.config
@@ -1,46 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
- <configSections>
- <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
- </configSections>
+ <configSections></configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<connectionStrings>
<!--Server mode-->
- <add name="RavenDB" connectionString="Url = http://localhost:8081" />
+ <add name="RavenDB" connectionString="Url = http://localhost:8080" />
</connectionStrings>
- <log4net debug="false">
- <appender name="DebugAppender" type="log4net.Appender.DebugAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
- </layout>
- </appender>
- <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />
- </layout>
- </appender>
- <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level - %message%newline" />
- </layout>
- </appender>
- <appender name="AmqpAppender" type="log4net.RabbitMQ.RabbitMQAppender, log4net.RabbitMQ">
- <topic value="documently.domain.service.{0}" />
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level - %message%newline" />
- </layout>
- </appender>
- <root>
- <level value="DEBUG" />
- <appender-ref ref="ConsoleAppender" />
- <appender-ref ref="AmqpAppender" />
- </root>
- <logger name="MassTransit">
- <level value="INFO" />
- </logger>
- </log4net>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -49,11 +16,15 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="RabbitMQ.Client" publicKeyToken="89e7d7c5feba84ce" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.6.1.0" newVersion="2.6.1.0" />
+ <bindingRedirect oldVersion="0.0.0.0-2.7.1.0" newVersion="2.7.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.8.0" newVersion="4.0.8.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Castle.Windsor" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
View
23 src/Documently.Domain.Service/packages.config
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Castle.Core" version="2.5.2" />
- <package id="Castle.Windsor" version="2.5.4" />
- <package id="EventStore" version="3.0.11293.43" />
+ <package id="Castle.Core" version="3.0.0.4001" />
+ <package id="Castle.Windsor" version="3.0.0.4001" />
+ <package id="EventStore" version="3.0.11326.44" />
<package id="EventStore.Persistence.Raven" version="2.0.11157" />
- <package id="log4net" version="1.2.10" />
- <package id="log4net.RabbitMQAppender" version="0.1.4" />
- <package id="Magnum" version="2.0.0.2" />
- <package id="MassTransit" version="2.0.1.0" />
- <package id="MassTransit.CastleWindsor" version="2.0.1.0" />
- <package id="MassTransit.RabbitMQ" version="2.0.1.0" />
- <package id="RabbitMQ.Client" version="2.6.1" />
+ <package id="log4net" version="1.2.11" />
+ <package id="Magnum" version="2.0.0.4" />
+ <package id="MassTransit" version="2.1.0" />
+ <package id="MassTransit.CastleWindsor" version="2.1.0" />
+ <package id="MassTransit.NLog" version="2.1.0" />
+ <package id="MassTransit.RabbitMQ" version="2.1.0" />
+ <package id="NLog" version="2.0.0.2000" />
+ <package id="RabbitMQ.Client" version="2.7.1" />
<package id="Raven.Abstractions" version="1.0" />
<package id="Raven.Client.Lightweight" version="1.0.3" />
<package id="Raven.Json" version="1.0.0" />
<package id="Raven.MissingBitsFromClientProfile" version="1.0.1" />
- <package id="Topshelf" version="2.2.2.0" />
+ <package id="TopShelf" version="2.2.3.0" />
</packages>
View
2 src/Documently.Domain/CommandHandlers/CreateCustomerCommandHandler.cs
@@ -20,7 +20,7 @@ public void Consume(CreateNewCustomer command)
{
var repo = _Repository();
- var client = Customer.CreateNew(command.Id, new CustomerName(command.CustomerName),
+ var client = Customer.CreateNew(command.AggregateId, new CustomerName(command.CustomerName),
new Address(command.Street, command.StreetNumber,
command.PostalCode, command.City),
new PhoneNumber(command.PhoneNumber));
View
5 src/Documently.Domain/CommandHandlers/DocumentAssociatedWithCollectionHandler.cs
@@ -1,7 +1,8 @@
using System;
using System.Management.Instrumentation;
using CommonDomain.Persistence;
-using Documently.Commands;
+using Documently.Commands;
+using Documently.Commands.DocumentMetaData;
using Documently.Domain.Domain;
using MassTransit;
@@ -20,7 +21,7 @@ public DocumentAssociatedWithCollectionHandler(Func<IRepository> repository)
public void Consume(AssociateDocumentWithCollection message)
{
var repository = _repository();
- var document = repository.GetById<Document>(message.Id);
+ var document = repository.GetById<DocumentMetaData>(message.AggregateId);
document.AssociateWithCollection(message.CollectionId);
repository.Save(document, Guid.NewGuid(), null);
View
2 src/Documently.Domain/CommandHandlers/DocumentIndexingHandler.cs
@@ -22,7 +22,7 @@ public DocumentIndexingHandler(Func<IRepository> repo)
public void Consume(InitializeDocumentIndexing command)
{
var repo = _Repo();
- var doc = repo.GetById<Document>(command.Id, command.Version);
+ var doc = repo.GetById<DocumentMetaData>(command.AggregateId, command.Version);
doc.AssociateWithDocumentBlob(command.BlobId);
//_Bus.Context().Respond();
repo.Save(doc, CombGuid.Generate(), null);
View
8 src/Documently.Domain/CommandHandlers/DocumentMetaDataHandler.cs
@@ -2,23 +2,25 @@
using CommonDomain.Persistence;
using Documently.Commands;
using Documently.Domain.Domain;
+using Magnum;
using MassTransit;
namespace Documently.Domain.CommandHandlers
{
public class DocumentMetaDataHandler : Consumes<CreateDocumentMetaData>.All
{
- private readonly Func<IRepository> _Repo;
+ private readonly Func<IRepository> _repo;
public DocumentMetaDataHandler(Func<IRepository> repo)
{
if (repo == null) throw new ArgumentNullException("repo");
- _Repo = repo;
+ _repo = repo;
}
public void Consume(CreateDocumentMetaData command)
{
- _Repo().Save(new Document(command.Title, command.UtcTime), command.Id, null);
+ var document = new DocumentMetaData(command.AggregateId, command.Title, command.UtcTime);
+ _repo().Save(document, CombGuid.Generate(), null);
}
}
}
View
2 src/Documently.Domain/CommandHandlers/RelocatingCustomerCommandHandler.cs
@@ -19,7 +19,7 @@ public void Consume(RelocateTheCustomer command)
{
var repo = _repository();
const int version = 0;
- var customer = repo.GetById<Customer>(command.Id, version);
+ var customer = repo.GetById<Customer>(command.AggregateId, version);
customer.RelocateCustomer(command.Street, command.Streetnumber, command.PostalCode, command.City);
repo.Save(customer, Guid.NewGuid(), null);
}
View
28 src/Documently.Domain/CommandHandlers/ShareDocumentCommandHandler.cs
@@ -0,0 +1,28 @@
+using System;
+using CommonDomain.Persistence;
+using Documently.Commands;
+using Documently.Domain.Domain;