Permalink
Browse files

Revert "Merge branch 'feature/appdomain-separation' into develop"

This reverts commit 1fd0332, reversing
changes made to 02b5d64.

Conflicts:

	src/Common/Hadouken.Common.Http.HttpListener/Hadouken.Common.Http.HttpListener.csproj
	src/Tests/Hadouken.UnitTests/Data/DataRepositoryTests.cs
  • Loading branch information...
1 parent c5a3bd3 commit acc04bd59cb40f996e40402319414b1a4c40da75 @vktr vktr committed May 7, 2013
Showing with 4,622 additions and 3,946 deletions.
  1. +35 −92 Hadouken.sln
  2. +0 −50 src/Common/Hadouken.Common.DI.Ninject/Modules/ComponentModule.cs
  3. +0 −35 src/Common/Hadouken.Common.DI.Ninject/Modules/MessageHandlerModule.cs
  4. +0 −22 src/Common/Hadouken.Common.DI.Ninject/Modules/PluginModule.cs
  5. +0 −53 src/Common/Hadouken.Common.DI.Ninject/NinjectDependencyResolver.cs
  6. +0 −36 src/Common/Hadouken.Common.DI.Ninject/Properties/AssemblyInfo.cs
  7. +0 −16 src/Common/Hadouken.Common.Data.FluentNHibernate/CustomAutomappingConfig.cs
  8. +0 −21 src/Common/Hadouken.Common.Data.FluentNHibernate/EnumMappingConvention.cs
  9. +0 −92 src/Common/Hadouken.Common.Data.FluentNHibernate/FluentNHibernateDataRepository.cs
  10. +0 −94 src/Common/Hadouken.Common.Data.FluentNHibernate/Hadouken.Common.Data.FluentNHibernate.csproj
  11. +0 −36 src/Common/Hadouken.Common.Data.FluentNHibernate/Properties/AssemblyInfo.cs
  12. +0 −8 src/Common/Hadouken.Common.Data.FluentNHibernate/packages.config
  13. BIN src/Common/Hadouken.Common.Data.FluentNHibernate/x64/SQLite.Interop.dll
  14. BIN src/Common/Hadouken.Common.Data.FluentNHibernate/x86/SQLite.Interop.dll
  15. +0 −90 src/Common/Hadouken.Common.Http.HttpListener/Hadouken.Common.Http.HttpListener.csproj
  16. +0 −111 src/Common/Hadouken.Common.Http.HttpListener/HttpListenerServer.cs
  17. +0 −67 src/Common/Hadouken.Common.Http.HttpListener/HttpServerFactory.cs
  18. +0 −26 src/Common/Hadouken.Common.Http.HttpListener/IdentityValidator.cs
  19. +0 −30 src/Common/Hadouken.Common.Http.HttpListener/KernelDependencyResolver.cs
  20. +0 −24 src/Common/Hadouken.Common.Http.HttpListener/LocalizedAssembliesResolver.cs
  21. +0 −36 src/Common/Hadouken.Common.Http.HttpListener/Properties/AssemblyInfo.cs
  22. +0 −30 src/Common/Hadouken.Common.Http.HttpListener/SelfHostedWebApiServer.cs
  23. +0 −8 src/Common/Hadouken.Common.Http.HttpListener/packages.config
  24. +0 −59 src/Common/Hadouken.Common.IO.Local/Hadouken.Common.IO.Local.csproj
  25. +0 −36 src/Common/Hadouken.Common.IO.Local/Properties/AssemblyInfo.cs
  26. +0 −22 src/Common/Hadouken.Common.Messaging.Msmq/ActionMessageHandlerWrapper.cs
  27. +0 −44 src/Common/Hadouken.Common.Messaging.Msmq/ConsumerFactoryConfigurator.cs
  28. +0 −85 src/Common/Hadouken.Common.Messaging.Msmq/Hadouken.Common.Messaging.Msmq.csproj
  29. +0 −9 src/Common/Hadouken.Common.Messaging.Msmq/IMsmqMessageBus.cs
  30. +0 −29 src/Common/Hadouken.Common.Messaging.Msmq/MassTransitExtensions.cs
  31. +0 −62 src/Common/Hadouken.Common.Messaging.Msmq/MsmqMessageBus.cs
  32. +0 −26 src/Common/Hadouken.Common.Messaging.Msmq/MsmqMessageBusFactory.cs
  33. +0 −6 src/Common/Hadouken.Common.Messaging.Msmq/packages.config
  34. +0 −15 src/Common/Hadouken.Common/BitTorrent/AddTorrentMessage.cs
  35. +0 −11 src/Common/Hadouken.Common/BitTorrent/TorrentCompletedMessage.cs
  36. +0 −11 src/Common/Hadouken.Common/BitTorrent/TorrentErrorMessage.cs
  37. +0 −15 src/Common/Hadouken.Common/BitTorrent/TorrentMessage.cs
  38. +0 −11 src/Common/Hadouken.Common/BitTorrent/TorrentRemovedMessage.cs
  39. +0 −11 src/Common/Hadouken.Common/BitTorrent/TorrentStartedMessage.cs
  40. +0 −11 src/Common/Hadouken.Common/BitTorrent/TorrentStoppedMessage.cs
  41. +0 −22 src/Common/Hadouken.Common/ComponentAttribute.cs
  42. +0 −21 src/Common/Hadouken.Common/DI/IDependencyResolver.cs
  43. +0 −22 src/Common/Hadouken.Common/Data/IDataRepository.cs
  44. +0 −86 src/Common/Hadouken.Common/Hadouken.Common.csproj
  45. +0 −15 src/Common/Hadouken.Common/Http/IHttpServerFactory.cs
  46. +0 −13 src/Common/Hadouken.Common/Http/IHttpWebApiServer.cs
  47. +0 −12 src/Common/Hadouken.Common/IComponentFactory.cs
  48. +0 −15 src/Common/Hadouken.Common/IEnvironment.cs
  49. +0 −51 src/Common/Hadouken.Common/Kernel.cs
  50. +0 −16 src/Common/Hadouken.Common/Messaging/IMessageBus.cs
  51. +0 −12 src/Common/Hadouken.Common/Messaging/IMessageBusFactory.cs
  52. +0 −12 src/Common/Hadouken.Common/Messaging/IMessageHandler.cs
  53. +0 −12 src/Common/Hadouken.Common/Messaging/ISubscriber.cs
  54. +0 −12 src/Common/Hadouken.Common/Messaging/ISubscriberFactory.cs
  55. +0 −19 src/Common/Hadouken.Common/Messaging/Message.cs
  56. +0 −40 src/Common/Hadouken.Common/Messaging/MessageBusExtensions.cs
  57. +0 −13 src/Common/Hadouken.Common/Plugins/IPluginEnvironment.cs
  58. +0 −32 src/Common/Hadouken.Common/Plugins/Plugin.cs
  59. +0 −15 src/Common/Hadouken.Common/Plugins/PluginLoadedMessage.cs
  60. +0 −15 src/Common/Hadouken.Common/Plugins/PluginUnloadedMessage.cs
  61. +6 −1 src/Config/Release/Hadouken.Hosts.WindowsService.exe.config
  62. +1 −0 src/Hosts/Hadouken.Hosts.WindowsService/Bootstrapper.cs
  63. +6 −37 src/Hosts/Hadouken.Hosts.WindowsService/Hadouken.Hosts.WindowsService.csproj
  64. +3 −10 src/Hosts/Hadouken.Hosts.WindowsService/HdknService.cs
  65. +6 −15 src/Hosts/Hadouken.Hosts.WindowsService/Program.cs
  66. +8 −2 src/Hosts/Hadouken.Hosts.WindowsService/app.config
  67. +0 −4 src/Hosts/Hadouken.Hosts.WindowsService/packages.config
  68. +7 −26 src/Installer/Components/Core.wxs
  69. +4 −36 src/Installer/Components/Lib.wxs
  70. +87 −0 src/Main/Hadouken.DI.Ninject/Hadouken.DI.Ninject.csproj
  71. +93 −0 src/Main/Hadouken.DI.Ninject/NinjectDependencyResolver.cs
  72. +4 −4 src/{Common/Hadouken.Common → Main/Hadouken.DI.Ninject}/Properties/AssemblyInfo.cs
  73. +1 −1 src/{Common/Hadouken.Common.DI.Ninject → Main/Hadouken.DI.Ninject}/packages.config
  74. +0 −8 src/Main/Hadouken.Http.Api/Dto/EditSettingDto.cs
  75. +0 −16 src/Main/Hadouken.Http.Api/Dto/GetSettingsDto.cs
  76. +0 −12 src/Main/Hadouken.Http.Api/Dto/PostTorrentDto.cs
  77. +0 −90 src/Main/Hadouken.Http.Api/Hadouken.Http.Api.csproj
  78. +0 −30 src/Main/Hadouken.Http.Api/PluginsController.cs
  79. +0 −36 src/Main/Hadouken.Http.Api/Properties/AssemblyInfo.cs
  80. +0 −81 src/Main/Hadouken.Http.Api/SettingsController.cs
  81. +0 −20 src/Main/Hadouken.Http.Api/SystemController.cs
  82. +0 −53 src/Main/Hadouken.Http.Api/TorrentsController.cs
  83. +0 −7 src/Main/Hadouken.Http.Api/packages.config
  84. +279 −0 src/Main/Hadouken.Http.HttpServer/DefaultHttpServer.cs
  85. +110 −0 src/Main/Hadouken.Http.HttpServer/FormData.cs
  86. +20 −15 ...adouken.Common.DI.Ninject.csproj → Main/Hadouken.Http.HttpServer/Hadouken.Http.HttpServer.csproj}
  87. +32 −0 src/Main/Hadouken.Http.HttpServer/HttpContext.cs
  88. +20 −0 src/Main/Hadouken.Http.HttpServer/HttpPostedFile.cs
  89. +181 −0 src/Main/Hadouken.Http.HttpServer/HttpRequest.cs
  90. +127 −0 src/Main/Hadouken.Http.HttpServer/HttpResponse.cs
  91. +190 −0 src/Main/Hadouken.Http.HttpServer/MultiPartStreamEnumerator.cs
  92. +53 −0 src/Main/Hadouken.Http.HttpServer/MultiPartStreamReader.cs
  93. +54 −0 src/Main/Hadouken.Http.HttpServer/MultiPartStreamValue.cs
  94. +4 −4 ...Common/Hadouken.Common.Messaging.Msmq → Main/Hadouken.Http.HttpServer}/Properties/AssemblyInfo.cs
  95. +5 −0 src/Main/Hadouken.Http.HttpServer/packages.config
  96. +5 −7 src/Main/Hadouken.Impl.BitTorrent/Hadouken.Impl.BitTorrent.csproj
  97. +0 −30 src/Main/Hadouken.Impl.BitTorrent/Handlers/AddTorrentHandler.cs
  98. +11 −14 src/Main/Hadouken.Impl.BitTorrent/HdknTorrentManager.cs
  99. +43 −52 src/Main/Hadouken.Impl.BitTorrent/MonoTorrentEngine.cs
  100. +1 −1 src/Main/Hadouken.Impl.BitTorrent/packages.config
  101. +9 −8 src/Main/Hadouken.Impl/Config/DefaultKeyValueStore.cs
  102. +0 −2 src/Main/Hadouken.Impl/Config/DefaultRegistryReader.cs
  103. +0 −2 src/Main/Hadouken.Impl/Data/DefaultMigratorRunner.cs
  104. +181 −0 src/Main/Hadouken.Impl/Data/FluentNhibernateDataRepository.cs
  105. +0 −21 src/Main/Hadouken.Impl/Data/Migrations/Drop/DropPluginInfoTable_001.cs
  106. +42 −10 src/Main/Hadouken.Impl/Hadouken.Impl.csproj
  107. +0 −59 src/Main/Hadouken.Impl/HostEnvironment.cs
  108. +0 −101 src/Main/Hadouken.Impl/Hosting/DefaultHadoukenHost.cs
  109. +69 −0 src/Main/Hadouken.Impl/Hosting/DefaultHost.cs
  110. +5 −5 src/{Common/Hadouken.Common.IO.Local → Main/Hadouken.Impl/IO}/LocalFileSystem.cs
  111. +56 −0 src/Main/Hadouken.Impl/Messaging/DefaultMessageBus.cs
  112. +70 −0 src/Main/Hadouken.Impl/Messaging/PropertiesInterceptor.cs
  113. +35 −0 src/Main/Hadouken.Impl/Plugins/AssemblyPluginLoader.cs
  114. +155 −0 src/Main/Hadouken.Impl/Plugins/DefaultPluginEngine.cs
  115. +120 −0 src/Main/Hadouken.Impl/Plugins/DefaultPluginManager.cs
  116. +40 −0 src/Main/Hadouken.Impl/Plugins/DirectoryPluginLoader.cs
  117. +59 −0 src/Main/Hadouken.Impl/Plugins/ZipPluginLoader.cs
  118. +7 −2 src/Main/Hadouken.Impl/packages.config
  119. BIN src/Main/Hadouken.Impl/x64/SQLite.Interop.dll
  120. BIN src/Main/Hadouken.Impl/x86/SQLite.Interop.dll
  121. +77 −0 src/Main/Hadouken.Messages/Hadouken.Messages.csproj
  122. +14 −0 src/Main/Hadouken.Messages/IPluginLoaded.cs
  123. +16 −0 src/Main/Hadouken.Messages/IPluginLoading.cs
  124. +15 −0 src/Main/Hadouken.Messages/ISettingChanged.cs
  125. +14 −0 src/Main/Hadouken.Messages/ITorrentAdded.cs
  126. +15 −0 src/Main/Hadouken.Messages/ITorrentCompleted.cs
  127. +14 −0 src/Main/Hadouken.Messages/ITorrentError.cs
  128. +17 −0 src/Main/Hadouken.Messages/ITorrentMoved.cs
  129. +11 −0 src/Main/Hadouken.Messages/Properties/AssemblyInfo.cs
  130. +0 −197 src/Main/Hadouken.Plugins.PluginEngine/DefaultPluginEngine.cs
  131. +0 −90 src/Main/Hadouken.Plugins.PluginEngine/Hadouken.Plugins.PluginEngine.csproj
  132. +0 −11 src/Main/Hadouken.Plugins.PluginEngine/IPluginLoader.cs
  133. +0 −27 src/Main/Hadouken.Plugins.PluginEngine/Loaders/AssemblyPluginLoader.cs
  134. +0 −31 src/Main/Hadouken.Plugins.PluginEngine/Loaders/DirectoryPluginLoader.cs
  135. +0 −50 src/Main/Hadouken.Plugins.PluginEngine/Loaders/ZipPluginLoader.cs
  136. +0 −16 src/Main/Hadouken.Plugins.PluginEngine/PluginEnvironment.cs
  137. +0 −31 src/Main/Hadouken.Plugins.PluginEngine/PluginInfo.cs
  138. +0 −16 src/Main/Hadouken.Plugins.PluginEngine/PluginManifest.cs
  139. +0 −54 src/Main/Hadouken.Plugins.PluginEngine/PluginManifestReader.cs
  140. +0 −107 src/Main/Hadouken.Plugins.PluginEngine/PluginSandbox.cs
  141. +0 −36 src/Main/Hadouken.Plugins.PluginEngine/Properties/AssemblyInfo.cs
  142. +0 −60 src/Main/Hadouken.Plugins.PluginEngine/Sandbox.cs
  143. +0 −6 src/Main/Hadouken.Plugins.PluginEngine/packages.config
  144. +1 −1 src/Main/Hadouken/BitTorrent/IBitTorrentEngine.cs
  145. +18 −0 src/Main/Hadouken/ComponentAttribute.cs
  146. +2 −2 src/{Common/Hadouken.Common/ComponentType.cs → Main/Hadouken/ComponentLifestyle.cs}
  147. +1 −1 src/Main/Hadouken/Configuration/IKeyValueStore.cs
  148. +1 −1 src/Main/Hadouken/Configuration/IRegistryReader.cs
  149. +0 −13 src/Main/Hadouken/Configuration/KeyValueChangedMessage.cs
  150. +27 −0 src/Main/Hadouken/DI/IDependencyResolver.cs
  151. +22 −0 src/Main/Hadouken/Data/IDataRepository.cs
  152. +1 −1 src/Main/Hadouken/Data/IMigrationRunner.cs
  153. +1 −1 src/{Common/Hadouken.Common → Main/Hadouken}/Data/Model.cs
  154. +14 −0 src/Main/Hadouken/Data/Models/PluginInfo.cs
  155. +1 −1 src/Main/Hadouken/Data/Models/Setting.cs
  156. +0 −1 src/Main/Hadouken/Data/Models/TorrentInfo.cs
  157. +55 −0 src/Main/Hadouken/Extensions/HttpListenerResponseExtensions.cs
  158. +47 −10 src/Main/Hadouken/Hadouken.csproj
  159. +1 −1 src/Main/Hadouken/Hosting/{IHadoukenHost.cs → IHost.cs}
  160. +13 −0 src/Main/Hadouken/Http/ActionResult.cs
  161. +37 −0 src/Main/Hadouken/Http/Api/AddFile.cs
  162. +44 −0 src/Main/Hadouken/Http/Api/AddUrl.cs
  163. +57 −0 src/Main/Hadouken/Http/Api/GetPeers.cs
  164. +83 −0 src/Main/Hadouken/Http/Api/GetPluginFile.cs
  165. +30 −0 src/Main/Hadouken/Http/Api/GetPlugins.cs
  166. +48 −0 src/Main/Hadouken/Http/Api/GetProperties.cs
  167. +60 −0 src/Main/Hadouken/Http/Api/GetSettings.cs
  168. +17 −0 src/Main/Hadouken/Http/Api/GetSystemInfo.cs
  169. +43 −0 src/Main/Hadouken/Http/Api/GetTorrentFiles.cs
  170. +67 −0 src/Main/Hadouken/Http/Api/GetTorrents.cs
  171. +43 −0 src/Main/Hadouken/Http/Api/ListDirectories.cs
  172. +28 −0 src/Main/Hadouken/Http/Api/PauseTorrent.cs
  173. +32 −0 src/Main/Hadouken/Http/Api/RemoveTorrent.cs
  174. +75 −0 src/Main/Hadouken/Http/Api/SetProperties.cs
  175. +31 −0 src/Main/Hadouken/Http/Api/SetSetting.cs
  176. +28 −0 src/Main/Hadouken/Http/Api/StartTorrent.cs
  177. +28 −0 src/Main/Hadouken/Http/Api/StopTorrent.cs
  178. +43 −0 src/Main/Hadouken/Http/ApiAction.cs
  179. +18 −0 src/Main/Hadouken/Http/ApiActionAttribute.cs
  180. +20 −0 src/Main/Hadouken/Http/ContentResult.cs
  181. +15 −0 src/Main/Hadouken/Http/IApiAction.cs
  182. +15 −0 src/Main/Hadouken/Http/IHttpContext.cs
  183. +16 −0 src/Main/Hadouken/Http/IHttpPostedFile.cs
  184. +46 −0 src/Main/Hadouken/Http/IHttpRequest.cs
  185. +34 −0 src/Main/Hadouken/Http/IHttpResponse.cs
  186. +4 −3 src/{Common/Hadouken.Common/Http/IHttpFileSystemServer.cs → Main/Hadouken/Http/IHttpServer.cs}
  187. +23 −0 src/Main/Hadouken/Http/JsonResult.cs
  188. +22 −0 src/Main/Hadouken/Http/RedirectResult.cs
  189. +2 −2 src/{Common/Hadouken.Common/BitTorrent/TorrentAddedMessage.cs → Main/Hadouken/IComponent.cs}
  190. +3 −3 src/{Common/Hadouken.Common → Main/Hadouken}/IO/IFileSystem.cs
  191. +66 −0 src/Main/Hadouken/Kernel.cs
  192. +2 −4 src/{Common/Hadouken.Common → Main/Hadouken}/Messaging/IMessage.cs
  193. +15 −0 src/Main/Hadouken/Messaging/IMessageBus.cs
  194. +3 −3 src/Main/Hadouken/Plugins/{PluginState.cs → IPlugin.cs}
  195. +3 −17 src/Main/Hadouken/Plugins/IPluginEngine.cs
  196. +0 −14 src/Main/Hadouken/Plugins/IPluginInfo.cs
  197. +14 −0 src/Main/Hadouken/Plugins/IPluginLoader.cs
  198. +21 −0 src/Main/Hadouken/Plugins/IPluginManager.cs
  199. +23 −0 src/Main/Hadouken/Plugins/PluginAttribute.cs
  200. +62 −58 src/Plugins/HdknPlugins.AutoAdd/AutoAddPlugin.cs
  201. +4 −4 ...ugins.AutoAdd/Data/Migrations/Create/{CreateFolderTable_001.cs → CreateWatchedFolderTable_001.cs}
  202. +7 −2 src/Plugins/HdknPlugins.AutoAdd/Data/Models/{Folder.cs → WatchedFolder.cs}
  203. +8 −22 src/Plugins/HdknPlugins.AutoAdd/HdknPlugins.AutoAdd.csproj
  204. +0 −12 src/Plugins/HdknPlugins.AutoAdd/Http/Api/FoldersController.cs
  205. +26 −0 src/Plugins/HdknPlugins.AutoAdd/Http/Api/GetWatchedFolders.cs
  206. +40 −0 src/Plugins/HdknPlugins.AutoAdd/Http/Api/RemoveWatchedFolders.cs
  207. +33 −0 src/Plugins/HdknPlugins.AutoAdd/Http/Api/SetWatchedFolders.cs
  208. +1 −3 src/Plugins/HdknPlugins.AutoAdd/Timers/DefaultTimerFactory.cs
  209. +1 −1 src/Plugins/HdknPlugins.AutoAdd/Timers/ITimerFactory.cs
  210. +0 −10 src/Plugins/HdknPlugins.AutoAdd/manifest.json
  211. +0 −4 src/Plugins/HdknPlugins.AutoAdd/packages.config
  212. +4 −9 src/Plugins/HdknPlugins.CreateTorrent/CreateTorrentPlugin.cs
  213. +2 −6 src/Plugins/HdknPlugins.CreateTorrent/HdknPlugins.CreateTorrent.csproj
  214. +0 −4 src/Plugins/HdknPlugins.CreateTorrent/manifest.json
  215. +1 −1 src/Plugins/HdknPlugins.CreateTorrent/packages.config
  216. +2 −1 src/Plugins/HdknPlugins.Importer/ImporterPlugin.cs
  217. +2 −2 src/Plugins/HdknPlugins.Rss/Data/Migrations/Create/CreateFeedTable_001.cs
  218. +2 −2 src/Plugins/HdknPlugins.Rss/Data/Migrations/Create/CreateFilterTable_001.cs
  219. +2 −1 src/Plugins/HdknPlugins.Rss/Data/Models/Feed.cs
  220. +6 −1 src/Plugins/HdknPlugins.Rss/Data/Models/Filter.cs
  221. +12 −29 src/Plugins/HdknPlugins.Rss/HdknPlugins.Rss.csproj
  222. +0 −28 src/Plugins/HdknPlugins.Rss/Http/Api/FeedsController.cs
  223. +26 −0 src/Plugins/HdknPlugins.Rss/Http/Api/GetFeeds.cs
  224. +33 −0 src/Plugins/HdknPlugins.Rss/Http/Api/RemoveFeeds.cs
  225. +33 −0 src/Plugins/HdknPlugins.Rss/Http/Api/SetFeeds.cs
  226. +0 −2 src/Plugins/HdknPlugins.Rss/Http/DefaultWebClient.cs
  227. +1 −1 src/Plugins/HdknPlugins.Rss/Http/IWebClient.cs
  228. +20 −31 src/Plugins/HdknPlugins.Rss/RssPlugin.cs
  229. +1 −3 src/Plugins/HdknPlugins.Rss/Timers/DefaultTimerFactory.cs
  230. +1 −1 src/Plugins/HdknPlugins.Rss/Timers/ITimerFactory.cs
  231. +0 −4 src/Plugins/HdknPlugins.Rss/manifest.json
  232. +1 −5 src/Plugins/HdknPlugins.Rss/packages.config
  233. +1 −1 src/Tests/Hadouken.UnitTests/App.config
  234. +76 −78 src/Tests/Hadouken.UnitTests/BitTorrent/BitTorrentEngineTests.cs
  235. +0 −34 src/Tests/Hadouken.UnitTests/BitTorrent/Handlers/AddTorrentHandlerTests.cs
  236. +5 −18 src/Tests/Hadouken.UnitTests/Data/DataRepositoryTests.cs
  237. +18 −38 src/Tests/Hadouken.UnitTests/Hadouken.UnitTests.csproj
  238. +48 −0 src/Tests/Hadouken.UnitTests/Http/Api/AddFileTests.cs
  239. +46 −0 src/Tests/Hadouken.UnitTests/Http/Api/GetTorrentsTests.cs
  240. +49 −0 src/Tests/Hadouken.UnitTests/Http/Api/PauseTorrentTests.cs
  241. +49 −0 src/Tests/Hadouken.UnitTests/Http/Api/StartTorrentTests.cs
  242. +49 −0 src/Tests/Hadouken.UnitTests/Http/Api/StopTorrentTests.cs
  243. +38 −0 src/Tests/Hadouken.UnitTests/Http/HttpContextHelper.cs
  244. +40 −0 src/Tests/Hadouken.UnitTests/Http/HttpServerTests.cs
  245. +5 −2 src/Tests/Hadouken.UnitTests/IO/LocalFileSystemTests.cs
  246. +31 −0 src/Tests/Hadouken.UnitTests/KernelTests.cs
  247. +35 −0 src/Tests/Hadouken.UnitTests/Messaging/MessageBusTests.cs
View
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2010
+# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Main", "Main", "{8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken", "src\Main\Hadouken\Hadouken.csproj", "{483BDD2E-74E7-4047-BAB4-99C7A25BB56D}"
@@ -13,17 +13,23 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Impl", "src\Main\H
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hosts", "Hosts", "{F0F27C95-81A1-4A5F-AEE9-27E8D56EF1CC}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Messages", "src\Main\Hadouken.Messages\Hadouken.Messages.csproj", "{DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Impl.BitTorrent", "src\Main\Hadouken.Impl.BitTorrent\Hadouken.Impl.BitTorrent.csproj", "{E5E2A7E9-E908-4E07-A948-E8B38DD139E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Hosts.WindowsService", "src\Hosts\Hadouken.Hosts.WindowsService\Hadouken.Hosts.WindowsService.csproj", "{4B1A745B-8F9D-4986-93CC-E9AD2A193041}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{022E9E69-163D-4875-92B4-07B9BAE90EC3}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{022E9E69-163D-4875-92B4-07B9BAE90EC3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Release", "Release", "{2AFAE465-F84D-48ED-8F26-BF304FCCCDB2}"
ProjectSection(SolutionItems) = preProject
src\Config\Release\Hadouken.Hosts.WindowsService.exe.config = src\Config\Release\Hadouken.Hosts.WindowsService.exe.config
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.DI.Ninject", "src\Main\Hadouken.DI.Ninject\Hadouken.DI.Ninject.csproj", "{237472F6-726C-40AF-8631-8D4D7BFD288E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Http.HttpServer", "src\Main\Hadouken.Http.HttpServer\Hadouken.Http.HttpServer.csproj", "{71DB95DE-C310-4165-A4BA-2C23A250CDB1}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{D33CFFC7-9C47-429A-99D1-E2E343B916F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HdknPlugins.AutoAdd", "src\Plugins\HdknPlugins.AutoAdd\HdknPlugins.AutoAdd.csproj", "{A7C38FA3-CAD6-4743-A758-82FB587DCDB4}"
@@ -34,24 +40,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HdknPlugins.Importer", "src
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HdknPlugins.CreateTorrent", "src\Plugins\HdknPlugins.CreateTorrent\HdknPlugins.CreateTorrent.csproj", "{C8D8F4ED-C7D9-429D-8956-0C1CCE1728EA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Plugins.PluginEngine", "src\Main\Hadouken.Plugins.PluginEngine\Hadouken.Plugins.PluginEngine.csproj", "{4C688A37-172C-41A1-8664-9661917FA0F2}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common", "src\Common\Hadouken.Common\Hadouken.Common.csproj", "{3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common.Messaging.Msmq", "src\Common\Hadouken.Common.Messaging.Msmq\Hadouken.Common.Messaging.Msmq.csproj", "{45144E7E-D412-468F-857F-3D7665CC971F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common.Data.FluentNHibernate", "src\Common\Hadouken.Common.Data.FluentNHibernate\Hadouken.Common.Data.FluentNHibernate.csproj", "{8252AB50-901E-436C-9B06-ABD32E50A692}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common.Http.HttpListener", "src\Common\Hadouken.Common.Http.HttpListener\Hadouken.Common.Http.HttpListener.csproj", "{25EB6288-005F-42A3-AE45-78730F63FD6A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common.IO.Local", "src\Common\Hadouken.Common.IO.Local\Hadouken.Common.IO.Local.csproj", "{5926E8BA-144B-4B88-93D5-56C2D5CA6573}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Common.DI.Ninject", "src\Common\Hadouken.Common.DI.Ninject\Hadouken.Common.DI.Ninject.csproj", "{5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hadouken.Http.Api", "src\Main\Hadouken.Http.Api\Hadouken.Http.Api.csproj", "{0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -84,6 +72,14 @@ Global
{28B6D10B-1CA2-43A9-B247-FAA7DD2155FA}.Release|x64.Build.0 = Release|Any CPU
{28B6D10B-1CA2-43A9-B247-FAA7DD2155FA}.Release|x86.ActiveCfg = Release|Any CPU
{28B6D10B-1CA2-43A9-B247-FAA7DD2155FA}.Release|x86.Build.0 = Release|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Debug|x64.Build.0 = Debug|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Debug|x86.Build.0 = Debug|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Release|x64.ActiveCfg = Release|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Release|x64.Build.0 = Release|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Release|x86.ActiveCfg = Release|Any CPU
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8}.Release|x86.Build.0 = Release|Any CPU
{E5E2A7E9-E908-4E07-A948-E8B38DD139E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{E5E2A7E9-E908-4E07-A948-E8B38DD139E5}.Debug|x64.Build.0 = Debug|Any CPU
{E5E2A7E9-E908-4E07-A948-E8B38DD139E5}.Debug|x86.ActiveCfg = Debug|Any CPU
@@ -100,6 +96,22 @@ Global
{4B1A745B-8F9D-4986-93CC-E9AD2A193041}.Release|x64.Build.0 = Release|x64
{4B1A745B-8F9D-4986-93CC-E9AD2A193041}.Release|x86.ActiveCfg = Release|x86
{4B1A745B-8F9D-4986-93CC-E9AD2A193041}.Release|x86.Build.0 = Release|x86
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Debug|x64.Build.0 = Debug|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Debug|x86.Build.0 = Debug|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Release|x64.ActiveCfg = Release|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Release|x64.Build.0 = Release|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Release|x86.ActiveCfg = Release|Any CPU
+ {237472F6-726C-40AF-8631-8D4D7BFD288E}.Release|x86.Build.0 = Release|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Debug|x64.Build.0 = Debug|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Debug|x86.Build.0 = Debug|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Release|x64.ActiveCfg = Release|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Release|x64.Build.0 = Release|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Release|x86.ActiveCfg = Release|Any CPU
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1}.Release|x86.Build.0 = Release|Any CPU
{A7C38FA3-CAD6-4743-A758-82FB587DCDB4}.Debug|x64.ActiveCfg = Debug|x64
{A7C38FA3-CAD6-4743-A758-82FB587DCDB4}.Debug|x64.Build.0 = Debug|x64
{A7C38FA3-CAD6-4743-A758-82FB587DCDB4}.Debug|x86.ActiveCfg = Debug|x86
@@ -132,92 +144,23 @@ Global
{C8D8F4ED-C7D9-429D-8956-0C1CCE1728EA}.Release|x64.Build.0 = Release|x64
{C8D8F4ED-C7D9-429D-8956-0C1CCE1728EA}.Release|x86.ActiveCfg = Release|x86
{C8D8F4ED-C7D9-429D-8956-0C1CCE1728EA}.Release|x86.Build.0 = Release|x86
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Debug|x64.ActiveCfg = Debug|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Debug|x64.Build.0 = Debug|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Debug|x86.ActiveCfg = Debug|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Debug|x86.Build.0 = Debug|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Release|x64.ActiveCfg = Release|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Release|x64.Build.0 = Release|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Release|x86.ActiveCfg = Release|Any CPU
- {4C688A37-172C-41A1-8664-9661917FA0F2}.Release|x86.Build.0 = Release|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Debug|x64.ActiveCfg = Debug|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Debug|x64.Build.0 = Debug|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Debug|x86.Build.0 = Debug|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Release|x64.ActiveCfg = Release|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Release|x64.Build.0 = Release|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Release|x86.ActiveCfg = Release|Any CPU
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B}.Release|x86.Build.0 = Release|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Debug|x64.Build.0 = Debug|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Debug|x86.Build.0 = Debug|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Release|x64.ActiveCfg = Release|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Release|x64.Build.0 = Release|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Release|x86.ActiveCfg = Release|Any CPU
- {45144E7E-D412-468F-857F-3D7665CC971F}.Release|x86.Build.0 = Release|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Debug|x64.ActiveCfg = Debug|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Debug|x64.Build.0 = Debug|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Debug|x86.Build.0 = Debug|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Release|x64.ActiveCfg = Release|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Release|x64.Build.0 = Release|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Release|x86.ActiveCfg = Release|Any CPU
- {8252AB50-901E-436C-9B06-ABD32E50A692}.Release|x86.Build.0 = Release|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Debug|x64.ActiveCfg = Debug|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Debug|x64.Build.0 = Debug|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Debug|x86.Build.0 = Debug|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Release|x64.ActiveCfg = Release|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Release|x64.Build.0 = Release|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Release|x86.ActiveCfg = Release|Any CPU
- {25EB6288-005F-42A3-AE45-78730F63FD6A}.Release|x86.Build.0 = Release|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Debug|x64.ActiveCfg = Debug|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Debug|x64.Build.0 = Debug|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Debug|x86.ActiveCfg = Debug|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Debug|x86.Build.0 = Debug|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Release|x64.ActiveCfg = Release|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Release|x64.Build.0 = Release|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Release|x86.ActiveCfg = Release|Any CPU
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573}.Release|x86.Build.0 = Release|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Debug|x64.ActiveCfg = Debug|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Debug|x64.Build.0 = Debug|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Debug|x86.ActiveCfg = Debug|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Debug|x86.Build.0 = Debug|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Release|x64.ActiveCfg = Release|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Release|x64.Build.0 = Release|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Release|x86.ActiveCfg = Release|Any CPU
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7}.Release|x86.Build.0 = Release|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Debug|x64.ActiveCfg = Debug|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Debug|x64.Build.0 = Debug|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Debug|x86.ActiveCfg = Debug|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Debug|x86.Build.0 = Debug|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Release|x64.ActiveCfg = Release|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Release|x64.Build.0 = Release|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Release|x86.ActiveCfg = Release|Any CPU
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{483BDD2E-74E7-4047-BAB4-99C7A25BB56D} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
{28B6D10B-1CA2-43A9-B247-FAA7DD2155FA} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
+ {DEA098A4-8A50-4A2D-A19B-D457ABA1FEE8} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
{E5E2A7E9-E908-4E07-A948-E8B38DD139E5} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
- {4C688A37-172C-41A1-8664-9661917FA0F2} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
- {0A098B4B-FFE5-4336-B9C3-2BDF0D5E7128} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
+ {237472F6-726C-40AF-8631-8D4D7BFD288E} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
+ {71DB95DE-C310-4165-A4BA-2C23A250CDB1} = {8FBDAD44-C335-4CEB-BD96-FB38CEB2811A}
{45774A72-4DE7-4E52-ABB0-9E728FFD1CC4} = {6A5BA16F-E1F2-4566-A42F-7D0F4B18FC4A}
{4B1A745B-8F9D-4986-93CC-E9AD2A193041} = {F0F27C95-81A1-4A5F-AEE9-27E8D56EF1CC}
{2AFAE465-F84D-48ED-8F26-BF304FCCCDB2} = {022E9E69-163D-4875-92B4-07B9BAE90EC3}
{A7C38FA3-CAD6-4743-A758-82FB587DCDB4} = {D33CFFC7-9C47-429A-99D1-E2E343B916F0}
{8B0CDBEF-A59E-48EA-814D-7A32B9A761DA} = {D33CFFC7-9C47-429A-99D1-E2E343B916F0}
{41E9A5E5-3671-4206-BA1A-BF7A33D08B52} = {D33CFFC7-9C47-429A-99D1-E2E343B916F0}
{C8D8F4ED-C7D9-429D-8956-0C1CCE1728EA} = {D33CFFC7-9C47-429A-99D1-E2E343B916F0}
- {3F2758D7-B296-41C4-B2B8-8F11AAFD5B8B} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
- {45144E7E-D412-468F-857F-3D7665CC971F} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
- {8252AB50-901E-436C-9B06-ABD32E50A692} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
- {25EB6288-005F-42A3-AE45-78730F63FD6A} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
- {5926E8BA-144B-4B88-93D5-56C2D5CA6573} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
- {5F5583D5-EE42-470C-9FC9-3D0308BC7CF7} = {56D3E2F5-23C1-4AC2-837C-7D8D0E8820AB}
EndGlobalSection
EndGlobal
@@ -1,50 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using Ninject.Extensions.Conventions;
-using Ninject.Infrastructure.Language;
-using Ninject.Modules;
-
-namespace Hadouken.Common.DI.Ninject.Modules
-{
- public class ComponentModule : NinjectModule
- {
- public override void Load()
- {
- var componentTypes = (from asm in AppDomain.CurrentDomain.GetAssemblies()
- from type in asm.GetTypes()
- where type.HasAttribute<ComponentAttribute>()
- where type.IsClass && !type.IsAbstract
- let attr = type.GetAttribute<ComponentAttribute>()
- select new
- {
- Type = type,
- Attribute = attr
- });
-
- foreach (var componentType in componentTypes)
- {
- switch (componentType.Attribute.ComponentType)
- {
- case ComponentType.Singleton:
- Kernel.Bind(componentType.Type.GetInterfaces()).To(componentType.Type).InSingletonScope();
- break;
-
- case ComponentType.Transient:
- Kernel.Bind(componentType.Type.GetInterfaces()).To(componentType.Type).InTransientScope();
- break;
- }
- }
- }
- }
-
- public static class ReflectionExtensions
- {
- public static T GetAttribute<T>(this MemberInfo mi)
- {
- return (T)mi.GetCustomAttributes(typeof(T), true).FirstOrDefault();
- }
- }
-}
@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Ninject.Extensions.Conventions;
-using Ninject.Modules;
-using Hadouken.Common.Messaging;
-
-namespace Hadouken.Common.DI.Ninject.Modules
-{
- public class MessageHandlerModule : NinjectModule
- {
- public override void Load()
- {
- var messageTypes = (from asm in AppDomain.CurrentDomain.GetAssemblies()
- from type in asm.GetTypes()
- where typeof (IMessage).IsAssignableFrom(type)
- where type.IsClass && !type.IsAbstract
- select type).ToList();
-
- foreach (var messageType in messageTypes)
- {
- var messageHandlerType = typeof (IMessageHandler<>).MakeGenericType(messageType);
-
- Kernel.Bind(
- ctx =>
- ctx.From(AppDomain.CurrentDomain.GetAssemblies())
- .SelectAllClasses()
- .InheritedFrom(messageHandlerType)
- .BindAllInterfaces());
- }
- }
- }
-}
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Hadouken.Common.Plugins;
-using Ninject.Extensions.Conventions;
-using Ninject.Modules;
-
-namespace Hadouken.Common.DI.Ninject.Modules
-{
- public class PluginModule : NinjectModule
- {
- public override void Load()
- {
- Kernel.Bind(ctx =>
- ctx.From(AppDomain.CurrentDomain.GetAssemblies())
- .SelectAllClasses()
- .InheritedFrom<Plugin>()
- .BindBase());
- }
- }
-}
@@ -1,53 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Hadouken.Common.DI.Ninject.Modules;
-using Ninject;
-
-namespace Hadouken.Common.DI.Ninject
-{
- public class NinjectDependencyResolver : IDependencyResolver
- {
- private readonly IKernel _kernel;
-
- public NinjectDependencyResolver()
- {
- _kernel = new StandardKernel(
- new ComponentModule(),
- new PluginModule(),
- new MessageHandlerModule()
- );
- }
-
- public T Get<T>()
- {
- return _kernel.Get<T>();
- }
-
- public object Get(Type serviceType)
- {
- return _kernel.TryGet(serviceType);
- }
-
- public IEnumerable<T> GetAll<T>()
- {
- return _kernel.GetAll<T>();
- }
-
- public IEnumerable<object> GetAll(Type serviceType)
- {
- return _kernel.GetAll(serviceType);
- }
-
- public void BindToFunc<T>(Func<T> factory)
- {
- _kernel.Bind<T>().ToMethod(ctx => factory());
- }
-
- public void BindToInstance<T>(T instance)
- {
- _kernel.Bind<T>().ToConstant(instance);
- }
- }
-}
Oops, something went wrong.

0 comments on commit acc04bd

Please sign in to comment.