Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed merge issues

  • Loading branch information...
commit 55bdea2ac4723b5f2a8ac970cce3db115047e0d2 2 parents a8b8d89 + 4f4bbe8
Craig Neuwirt authored
Showing with 40,318 additions and 39,133 deletions.
  1. +63 −63 Rhino.Commons-vs2008.sln
  2. +4 −4 Rhino.Commons.ActiveRecord/ForTesting/ActiveRecordEmbeddedDBTestFixtureBase.cs
  3. +4 −4 Rhino.Commons.ActiveRecord/ForTesting/ActiveRecordInMemoryTestFixtureBase.cs
  4. +159 −149 Rhino.Commons.ActiveRecord/Rhino.Commons.ActiveRecord-vs2008.csproj
  5. +35 −32 Rhino.Commons.Binsor/AbstractConfigurationRunner.cs
  6. +6 −13 Rhino.Commons.Binsor/BinsorCompilerStep.cs
  7. +11 −20 Rhino.Commons.Binsor/BinsorGlobalMethods.cs
  8. +6 −6 Rhino.Commons.Binsor/BooComponentInstaller.cs
  9. +57 −158 Rhino.Commons.Binsor/BooReader.cs
  10. +21 −45 Rhino.Commons.Binsor/Component.cs
  11. +15 −18 Rhino.Commons.Binsor/ComponentReference.cs
  12. +0 −1  Rhino.Commons.Binsor/Configuration/AttributeBuilder.cs
  13. +0 −1  Rhino.Commons.Binsor/Configuration/ChildBuilder.cs
  14. +4 −5 Rhino.Commons.Binsor/Configuration/ConfigurationHelper.cs
  15. +0 −1  Rhino.Commons.Binsor/Configuration/IConfigurationBuilder.cs
  16. +0 −1  Rhino.Commons.Binsor/Configuration/IConfigurationFormatter.cs
  17. +5 −6 Rhino.Commons.Binsor/Configuration/KeyMapBuilder.cs
  18. +3 −5 Rhino.Commons.Binsor/Configuration/KeyValuesBuilder.cs
  19. +2 −3 Rhino.Commons.Binsor/Configuration/ListBuilder.cs
  20. +5 −3 Rhino.Commons.Binsor/ContainerAdapter.cs
  21. +0 −107 Rhino.Commons.Binsor/Extend.cs
  22. +17 −7 Rhino.Commons.Binsor/Extensions/AbstractComponentExtension.cs
  23. +0 −1  Rhino.Commons.Binsor/Extensions/ConfigurationExtension.cs
  24. +22 −20 Rhino.Commons.Binsor/Extensions/EventWireExtension.cs
  25. +40 −19 Rhino.Commons.Binsor/Extensions/FactorySupportExtension.cs
  26. +1 −2  Rhino.Commons.Binsor/Extensions/InterceptorExtension.cs
  27. +46 −17 Rhino.Commons.Binsor/Extensions/LifestyleExtension.cs
  28. +53 −0 Rhino.Commons.Binsor/Extensions/OnCreateExtension.cs
  29. +1 −1  Rhino.Commons.Binsor/Extensions/ParametersExtension.cs
  30. +11 −1 Rhino.Commons.Binsor/Extensions/StartableExtension.cs
  31. +19 −21 Rhino.Commons.Binsor/Facility.cs
  32. +0 −1  Rhino.Commons.Binsor/IComponentExtension.cs
  33. +35 −0 Rhino.Commons.Binsor/IRegisterable.cs
  34. +17 −16 Rhino.Commons.Binsor/Installer/BinsorResourceInstaller.cs
  35. +34 −15 Rhino.Commons.Binsor/Installer/BinsorScript.cs
  36. +8 −7 Rhino.Commons.Binsor/Installer/BinsorScriptInstaller.cs
  37. +23 −38 Rhino.Commons.Binsor/Macros/AbstractBinsorMacro.cs
  38. +39 −34 Rhino.Commons.Binsor/Macros/BaseBinsorExtensionMacro.cs
  39. +8 −18 Rhino.Commons.Binsor/Macros/BaseBinsorToplevelMacro.cs
  40. +2 −4 Rhino.Commons.Binsor/Macros/BaseConfigurationMacro.cs
  41. +3 −3 Rhino.Commons.Binsor/Macros/ComponentMacro.cs
  42. +1 −2  Rhino.Commons.Binsor/Macros/ComponentMethodVisitor.cs
  43. +1 −3 Rhino.Commons.Binsor/Macros/ConfigurationMacro.cs
  44. +4 −4 Rhino.Commons.Binsor/Macros/ConfigurationNodeVisitor.cs
  45. +59 −23 Rhino.Commons.Binsor/Macros/CreateUsingMacro.cs
  46. +0 −28 Rhino.Commons.Binsor/Macros/ExtendMacro.cs
  47. +0 −1  Rhino.Commons.Binsor/Macros/FacilityMacro.cs
  48. +25 −28 Rhino.Commons.Binsor/Macros/HashConfigurationBuilder.cs
  49. +1 −1  Rhino.Commons.Binsor/Macros/InterceptorMacro.cs
  50. +28 −26 Rhino.Commons.Binsor/Macros/LifestyleMacro.cs
  51. +1 −2  Rhino.Commons.Binsor/Macros/MacroHelper.cs
  52. +77 −0 Rhino.Commons.Binsor/Macros/OnCreateMacro.cs
  53. +1 −3 Rhino.Commons.Binsor/Macros/ParametersMacro.cs
  54. +37 −0 Rhino.Commons.Binsor/Macros/RegisterMacro.cs
  55. +1 −1  Rhino.Commons.Binsor/Macros/StartMacro.cs
  56. +11 −11 Rhino.Commons.Binsor/Macros/WireEventMacro.cs
  57. +45 −0 Rhino.Commons.Binsor/RegisterAfterCreation.cs
  58. +0 −57 Rhino.Commons.Binsor/RegisterComponentAndFacilitiesAfterCreation.cs
  59. +58 −0 Rhino.Commons.Binsor/Registration.cs
  60. +182 −152 Rhino.Commons.Binsor/Rhino.Commons.Binsor.csproj
  61. +11 −12 Rhino.Commons.Binsor/TransformUnknownReferences.cs
  62. +3 −6 Rhino.Commons.Binsor/TypeEnumerable.cs
  63. +119 −83 Rhino.Commons.Clr/Rhino.Commons.Clr-vs2008.csproj
  64. +16 −17 Rhino.Commons.NHibernate/Facilities/MultipleNHibernateUnitOfWorkFacility.cs
  65. +8 −12 Rhino.Commons.NHibernate/Facilities/NHibernateUnitOfWorkFacility.cs
  66. +2 −3 Rhino.Commons.NHibernate/Facilities/NHibernateUnitOfWorkFacilityConfig.cs
  67. +13 −13 Rhino.Commons.NHibernate/Facilities/RhinoTransactionFacility.cs
  68. +62 −62 Rhino.Commons.NHibernate/Properties/Settings.Designer.cs
  69. +207 −175 Rhino.Commons.NHibernate/Rhino.Commons.NHibernate-v2008.csproj
  70. +2 −4 Rhino.Commons.NHibernate/UnitOfWork/NHibernateUnitOfWorkFactory.cs
  71. +25 −25 Rhino.Commons.NHibernate/app.config
  72. +21 −6 Rhino.Commons.Test/Binsor/Binsor2TestCase.cs
  73. +8 −6 Rhino.Commons.Test/Binsor/BinsorFacilities_TestCase.cs
  74. +3 −3 Rhino.Commons.Test/Binsor/BinsorStreamTestCase.cs
  75. +3 −3 Rhino.Commons.Test/Binsor/BinsorTestCase.cs
  76. +3 −1 Rhino.Commons.Test/Binsor/EmailSender.cs
  77. +1 −1  Rhino.Commons.Test/Binsor/Facilities.boo
  78. +3 −3 Rhino.Commons.Test/Binsor/FakeInterceptor.cs
  79. +1 −0  Rhino.Commons.Test/Binsor/InterceptorTestCase.cs
  80. +3 −2 Rhino.Commons.Test/Binsor/UsingAllTypesFixture.cs
  81. +17 −7 Rhino.Commons.Test/Binsor/Windsor2.boo
  82. +5 −5 Rhino.Commons.Test/Repository/RepositoryTests.cs
  83. +398 −384 Rhino.Commons.Test/Rhino.Commons.Test-vs2008.csproj
  84. +15 −18 Rhino.Commons.Test/app.config
  85. +182 −180 Rhino.Commons/Rhino.Commons-vs2008.csproj
  86. +5 −7 Rhino.Commons/RhinoContainer/ConfigurationObjectConverter.cs
  87. +3 −2 Rhino.Commons/RhinoContainer/IoC.cs
  88. +30 −26 Rhino.Commons/RhinoContainer/RhinoContainer.cs
  89. +5 −5 Rhino.Commons/app.config
  90. BIN  SharedLibs/Boo/Boo.Lang.CodeDom.dll
  91. BIN  SharedLibs/Boo/Boo.Lang.Compiler.dll
  92. BIN  SharedLibs/Boo/Boo.Lang.Extensions.dll
  93. BIN  SharedLibs/Boo/Boo.Lang.Interpreter.dll
  94. BIN  SharedLibs/Boo/Boo.Lang.Parser.dll
  95. BIN  SharedLibs/Boo/Boo.Lang.PatternMatching.dll
  96. BIN  SharedLibs/Boo/Boo.Lang.Useful.dll
  97. BIN  SharedLibs/Boo/Boo.Lang.dll
  98. BIN  SharedLibs/Boo/Boo.Microsoft.Build.Tasks.dll
  99. +60 −20 SharedLibs/Boo/Boo.Microsoft.Build.targets
  100. BIN  SharedLibs/Boo/Boo.NAnt.Tasks.dll
  101. BIN  SharedLibs/Boo/boo.exe
  102. BIN  SharedLibs/Boo/booc.exe
  103. +9 −6 SharedLibs/Boo/booc.exe.config
  104. BIN  SharedLibs/Boo/booi.exe
  105. +9 −6 SharedLibs/Boo/booi.exe.config
  106. BIN  SharedLibs/Boo/booish.exe
  107. +9 −6 SharedLibs/Boo/booish.exe.config
  108. +5 −0 SharedLibs/Boo/update.bat
  109. BIN  SharedLibs/Castle/Castle
  110. BIN  SharedLibs/Castle/Castle.ActiveRecord.Tests.Model.dll
  111. BIN  SharedLibs/Castle/Castle.ActiveRecord.Tests.Model.pdb
  112. +11,770 −11,753 SharedLibs/Castle/Castle.ActiveRecord.XML
  113. BIN  SharedLibs/Castle/Castle.ActiveRecord.dll
  114. BIN  SharedLibs/Castle/Castle.ActiveRecord.pdb
  115. BIN  SharedLibs/Castle/Castle.Components.Validator.dll
  116. BIN  SharedLibs/Castle/Castle.Components.Validator.pdb
  117. +3,729 −3,752 SharedLibs/Castle/Castle.Components.Validator.xml
  118. BIN  SharedLibs/Castle/Castle.Core.dll
  119. BIN  SharedLibs/Castle/Castle.Core.pdb
  120. +4,749 −3,450 SharedLibs/Castle/Castle.Core.xml
  121. +0 −693 SharedLibs/Castle/Castle.DynamicProxy.XML
  122. BIN  SharedLibs/Castle/Castle.DynamicProxy.dll
  123. BIN  SharedLibs/Castle/Castle.DynamicProxy.pdb
  124. +0 −1,471 SharedLibs/Castle/Castle.DynamicProxy2.xml
  125. BIN  SharedLibs/Castle/Castle.Facilities.ActiveRecordIntegration.dll
  126. BIN  SharedLibs/Castle/Castle.Facilities.ActiveRecordIntegration.pdb
  127. +1,043 −1,022 SharedLibs/Castle/Castle.Facilities.ActiveRecordIntegration.xml
  128. BIN  SharedLibs/Castle/Castle.Facilities.AutoTx.dll
  129. BIN  SharedLibs/Castle/Castle.Facilities.AutoTx.pdb
  130. +198 −0 SharedLibs/Castle/Castle.Facilities.AutoTx.xml
  131. +0 −131 SharedLibs/Castle/Castle.Facilities.AutomaticTransactionManagement.xml
  132. BIN  SharedLibs/Castle/Castle.Facilities.EventWiring.dll
  133. BIN  SharedLibs/Castle/Castle.Facilities.EventWiring.pdb
  134. BIN  SharedLibs/Castle/Castle.Facilities.FactorySupport.dll
  135. BIN  SharedLibs/Castle/Castle.Facilities.FactorySupport.pdb
  136. BIN  SharedLibs/Castle/Castle.Facilities.Logging.dll
  137. BIN  SharedLibs/Castle/Castle.Facilities.Logging.pdb
  138. BIN  SharedLibs/Castle/Castle.Services.Logging.Log4netIntegration.dll
  139. BIN  SharedLibs/Castle/Castle.Services.Transaction.dll
  140. BIN  SharedLibs/Castle/Castle.Services.Transaction.pdb
  141. +1,586 −445 SharedLibs/Castle/Castle.Services.Transaction.xml
  142. BIN  SharedLibs/Castle/Castle.Windsor.Tests.dll
  143. +58 −0 SharedLibs/Castle/Castle.Windsor.Tests.dll.config
  144. BIN  SharedLibs/Castle/Castle.Windsor.Tests.pdb
  145. BIN  SharedLibs/Castle/Castle.Windsor.dll
  146. BIN  SharedLibs/Castle/Castle.Windsor.pdb
  147. +7,371 −1,571 SharedLibs/Castle/Castle.Windsor.xml
  148. BIN  SharedLibs/NHibernate/Antlr3.Runtime.dll
  149. BIN  SharedLibs/NHibernate/Castle.Core.dll
  150. BIN  SharedLibs/NHibernate/Castle.Core.pdb
  151. +5 −0 SharedLibs/NHibernate/Castle.Core.xml
  152. +0 −13 SharedLibs/NHibernate/Castle.DynamicProxy.license.txt
  153. +0 −1,471 SharedLibs/NHibernate/Castle.DynamicProxy2.xml
  154. BIN  SharedLibs/NHibernate/Iesi.Collections.Test.dll
  155. BIN  SharedLibs/NHibernate/Iesi.Collections.dll
  156. BIN  SharedLibs/NHibernate/Iesi.Collections.pdb
  157. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Castle.Tests.dll
  158. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Castle.Tests.pdb
  159. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Castle.dll
  160. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Castle.pdb
  161. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.LinFu.Tests.dll
  162. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.LinFu.Tests.pdb
  163. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.LinFu.dll
  164. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.LinFu.pdb
  165. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Spring.Tests.dll
  166. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Spring.Tests.pdb
  167. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Spring.dll
  168. BIN  SharedLibs/NHibernate/NHibernate.ByteCode.Spring.pdb
  169. BIN  SharedLibs/NHibernate/NHibernate.Test.dll
  170. BIN  SharedLibs/NHibernate/NHibernate.dll
  171. BIN  SharedLibs/NHibernate/NHibernate.pdb
  172. BIN  SharedLibs/Rhino-dsl/Boo.Lang.Compiler.dll
  173. BIN  SharedLibs/Rhino-dsl/Boo.Lang.Parser.dll
  174. BIN  SharedLibs/Rhino-dsl/Boo.Lang.dll
  175. BIN  SharedLibs/Rhino-dsl/Rhino.DSL.dll
  176. BIN  SharedLibs/Rhino-dsl/Rhino.DSL.pdb
  177. BIN  SharedLibs/Tools/MbUnit/MbUnit.AddIn.dll
  178. BIN  SharedLibs/Tools/MbUnit/MbUnit.Cons.exe
  179. +12 −12 SharedLibs/Tools/MbUnit/MbUnit.Cons.exe.config
  180. BIN  SharedLibs/Tools/MbUnit/MbUnit.Demo.1.1.dll
  181. +0 −20 SharedLibs/Tools/MbUnit/MbUnit.Framework.1.1.XML
  182. BIN  SharedLibs/Tools/MbUnit/MbUnit.Framework.1.1.dll
  183. BIN  SharedLibs/Tools/MbUnit/MbUnit.Framework.2.0.dll
  184. BIN  SharedLibs/Tools/MbUnit/MbUnit.Framework.2.0.pdb
  185. +278 −0 SharedLibs/Tools/MbUnit/MbUnit.Framework.2.0.xml
  186. +6,929 −10,995 SharedLibs/Tools/MbUnit/MbUnit.Framework.XML
  187. BIN  SharedLibs/Tools/MbUnit/MbUnit.Framework.dll
  188. BIN  SharedLibs/Tools/MbUnit/MbUnit.Framework.pdb
  189. BIN  SharedLibs/Tools/MbUnit/MbUnit.GUI.exe
  190. +13 −13 SharedLibs/Tools/MbUnit/MbUnit.GUI.exe.config
  191. BIN  SharedLibs/Tools/MbUnit/MbUnit.MSBuild.Tasks.dll
  192. BIN  SharedLibs/Tools/MbUnit/MbUnit.Tasks.dll
  193. BIN  SharedLibs/Tools/MbUnit/MbUnit.Tests.1.1.dll
126 Rhino.Commons-vs2008.sln
View
@@ -1,63 +1,63 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons-vs2008", "Rhino.Commons\Rhino.Commons-vs2008.csproj", "{F6321543-E1EC-4999-A562-D9F060C8E3DF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Test-vs2008", "Rhino.Commons.Test\Rhino.Commons.Test-vs2008.csproj", "{EE98519D-104D-4A31-ADD8-82C5F836018C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.ActiveRecord-vs2008", "Rhino.Commons.ActiveRecord\Rhino.Commons.ActiveRecord-vs2008.csproj", "{2B796A66-19FC-4E72-BB02-DC16D878725A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Clr-vs2008", "Rhino.Commons.Clr\Rhino.Commons.Clr-vs2008.csproj", "{77693BCD-4C8A-4523-AEE7-8AB46C1034E7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.NHibernate-v2008", "Rhino.Commons.NHibernate\Rhino.Commons.NHibernate-v2008.csproj", "{BF4E220E-5AF8-4448-ABA9-981D69AB8775}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Binsor", "Rhino.Commons.Binsor\Rhino.Commons.Binsor.csproj", "{CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- Start|Any CPU = Start|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Release|Any CPU.Build.0 = Release|Any CPU
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Start|Any CPU.ActiveCfg = Release|Any CPU
- {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Start|Any CPU.Build.0 = Release|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Release|Any CPU.Build.0 = Release|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Start|Any CPU.ActiveCfg = Start|Any CPU
- {EE98519D-104D-4A31-ADD8-82C5F836018C}.Start|Any CPU.Build.0 = Start|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Release|Any CPU.Build.0 = Release|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Start|Any CPU.ActiveCfg = Release|Any CPU
- {2B796A66-19FC-4E72-BB02-DC16D878725A}.Start|Any CPU.Build.0 = Release|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Release|Any CPU.Build.0 = Release|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Start|Any CPU.ActiveCfg = Release|Any CPU
- {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Start|Any CPU.Build.0 = Release|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Release|Any CPU.Build.0 = Release|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Start|Any CPU.ActiveCfg = Release|Any CPU
- {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Start|Any CPU.Build.0 = Release|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Release|Any CPU.Build.0 = Release|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Start|Any CPU.ActiveCfg = Release|Any CPU
- {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Start|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons-vs2008", "Rhino.Commons\Rhino.Commons-vs2008.csproj", "{F6321543-E1EC-4999-A562-D9F060C8E3DF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Test-vs2008", "Rhino.Commons.Test\Rhino.Commons.Test-vs2008.csproj", "{EE98519D-104D-4A31-ADD8-82C5F836018C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.ActiveRecord-vs2008", "Rhino.Commons.ActiveRecord\Rhino.Commons.ActiveRecord-vs2008.csproj", "{2B796A66-19FC-4E72-BB02-DC16D878725A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Clr-vs2008", "Rhino.Commons.Clr\Rhino.Commons.Clr-vs2008.csproj", "{77693BCD-4C8A-4523-AEE7-8AB46C1034E7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.NHibernate-v2008", "Rhino.Commons.NHibernate\Rhino.Commons.NHibernate-v2008.csproj", "{BF4E220E-5AF8-4448-ABA9-981D69AB8775}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Rhino.Commons.Binsor", "Rhino.Commons.Binsor\Rhino.Commons.Binsor.csproj", "{CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Start|Any CPU = Start|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Start|Any CPU.ActiveCfg = Release|Any CPU
+ {F6321543-E1EC-4999-A562-D9F060C8E3DF}.Start|Any CPU.Build.0 = Release|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Start|Any CPU.ActiveCfg = Start|Any CPU
+ {EE98519D-104D-4A31-ADD8-82C5F836018C}.Start|Any CPU.Build.0 = Start|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Start|Any CPU.ActiveCfg = Release|Any CPU
+ {2B796A66-19FC-4E72-BB02-DC16D878725A}.Start|Any CPU.Build.0 = Release|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Start|Any CPU.ActiveCfg = Release|Any CPU
+ {77693BCD-4C8A-4523-AEE7-8AB46C1034E7}.Start|Any CPU.Build.0 = Release|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Start|Any CPU.ActiveCfg = Release|Any CPU
+ {BF4E220E-5AF8-4448-ABA9-981D69AB8775}.Start|Any CPU.Build.0 = Release|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Start|Any CPU.ActiveCfg = Release|Any CPU
+ {CCB0BEBF-146A-4C42-B22A-1EB338E4EA8B}.Start|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
8 Rhino.Commons.ActiveRecord/ForTesting/ActiveRecordEmbeddedDBTestFixtureBase.cs
View
@@ -96,10 +96,10 @@ public void FixtureInitialize(string rhinoContainerConfig, InPlaceConfigurationS
IoC.Initialize(new RhinoContainer(rhinoContainerConfig));
IHandler unitOfWorkFactoryHandler = IoC.Container.Kernel
.GetHandler(typeof(IUnitOfWorkFactory));
- unitOfWorkFactoryHandler
- .AddCustomDependencyValue("configurationSource", cfg);
- unitOfWorkFactoryHandler
- .AddCustomDependencyValue("assemblies", assemblies);
+ //unitOfWorkFactoryHandler
+ // .AddCustomDependencyValue("configurationSource", cfg);
+ //unitOfWorkFactoryHandler
+ // .AddCustomDependencyValue("assemblies", assemblies);
IoC.Resolve<IUnitOfWorkFactory>().Init();
}
else
8 Rhino.Commons.ActiveRecord/ForTesting/ActiveRecordInMemoryTestFixtureBase.cs
View
@@ -97,10 +97,10 @@ public void OneTimeInitalize(string rhinoContainerConfig, InPlaceConfigurationSo
IoC.Initialize(new RhinoContainer(rhinoContainerConfig));
IHandler unitOfWorkFactoryHandler = IoC.Container.Kernel
.GetHandler(typeof(IUnitOfWorkFactory));
- unitOfWorkFactoryHandler
- .AddCustomDependencyValue("configurationSource", cfg);
- unitOfWorkFactoryHandler
- .AddCustomDependencyValue("assemblies", assemblies);
+ //unitOfWorkFactoryHandler
+ // .AddCustomDependencyValue("configurationSource", cfg);
+ //unitOfWorkFactoryHandler
+ // .AddCustomDependencyValue("assemblies", assemblies);
}
else
{
308 Rhino.Commons.ActiveRecord/Rhino.Commons.ActiveRecord-vs2008.csproj
View
@@ -1,156 +1,166 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{2B796A66-19FC-4E72-BB02-DC16D878725A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Rhino.Commons</RootNamespace>
- <AssemblyName>Rhino.Commons.ActiveRecord</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\ayende-open-source.snk</AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <NoWarn>1607</NoWarn>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Castle.ActiveRecord, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.ActiveRecord.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.Core.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Facilities.AutomaticTransactionManagement, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.Facilities.AutomaticTransactionManagement.dll</HintPath>
- </Reference>
- <Reference Include="Castle.MicroKernel, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.MicroKernel.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Services.Transaction, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.Services.Transaction.dll</HintPath>
- </Reference>
- <Reference Include="Castle.Windsor, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\Castle\Castle.Windsor.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="Microsoft.Build.Utilities" />
- <Reference Include="NHibernate, Version=2.1.0.1003, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\SharedLibs\NHibernate\NHibernate.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Web" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="DateRange.cs" />
- <Compile Include="Facilities\ActiveRecordUnitOfWorkFacility.cs" />
- <Compile Include="ForTesting\ActiveRecordEmbeddedDBTestFixtureBase.cs" />
- <Compile Include="ForTesting\ActiveRecordInMemoryTestFixtureBase.cs" />
- <Compile Include="ForTesting\ARUnitOfWorkTestContext.cs" />
- <Compile Include="NHibernate\ActiveRecordCriteriaBatch.cs" />
- <Compile Include="NHibernate\PluralizingNamingStrategy.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Repositories\ARRepository.cs" />
- <Compile Include="Tasks\ActiveRecord_CreateDatabase.cs" />
- <Compile Include="UnitOfWork\ActiveRecordTransactionAdapter.cs" />
- <Compile Include="UnitOfWork\ActiveRecordUnitOfWorkAdapter.cs" />
- <Compile Include="UnitOfWork\ActiveRecordUnitOfWorkFactory.cs" />
- <Compile Include="UnitOfWork\IActiveRecordUnitOfWork.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Rhino.Commons.Clr\Rhino.Commons.Clr-vs2008.csproj">
- <Project>{77693BCD-4C8A-4523-AEE7-8AB46C1034E7}</Project>
- <Name>Rhino.Commons.Clr</Name>
- </ProjectReference>
- <ProjectReference Include="..\Rhino.Commons.NHibernate\Rhino.Commons.NHibernate-v2008.csproj">
- <Project>{BF4E220E-5AF8-4448-ABA9-981D69AB8775}</Project>
- <Name>Rhino.Commons.NHibernate</Name>
- </ProjectReference>
- <ProjectReference Include="..\Rhino.Commons\Rhino.Commons-vs2008.csproj">
- <Project>{F6321543-E1EC-4999-A562-D9F060C8E3DF}</Project>
- <Name>Rhino.Commons</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\ayende-open-source.snk">
- <Link>ayende-open-source.snk</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{2B796A66-19FC-4E72-BB02-DC16D878725A}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Rhino.Commons</RootNamespace>
+ <AssemblyName>Rhino.Commons.ActiveRecord</AssemblyName>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>..\ayende-open-source.snk</AssemblyOriginatorKeyFile>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <NoWarn>1607</NoWarn>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Castle.ActiveRecord, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\Castle\Castle.ActiveRecord.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\Castle\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Facilities.AutoTx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\Castle\Castle.Facilities.AutoTx.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Services.Transaction, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\Castle\Castle.Services.Transaction.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Windsor, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\Castle\Castle.Windsor.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Build.Framework" />
+ <Reference Include="Microsoft.Build.Utilities" />
+ <Reference Include="NHibernate, Version=2.1.0.1003, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\SharedLibs\NHibernate\NHibernate.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Web" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="DateRange.cs" />
+ <Compile Include="Facilities\ActiveRecordUnitOfWorkFacility.cs" />
+ <Compile Include="ForTesting\ActiveRecordEmbeddedDBTestFixtureBase.cs" />
+ <Compile Include="ForTesting\ActiveRecordInMemoryTestFixtureBase.cs" />
+ <Compile Include="ForTesting\ARUnitOfWorkTestContext.cs" />
+ <Compile Include="NHibernate\ActiveRecordCriteriaBatch.cs" />
+ <Compile Include="NHibernate\PluralizingNamingStrategy.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Repositories\ARRepository.cs" />
+ <Compile Include="Tasks\ActiveRecord_CreateDatabase.cs" />
+ <Compile Include="UnitOfWork\ActiveRecordTransactionAdapter.cs" />
+ <Compile Include="UnitOfWork\ActiveRecordUnitOfWorkAdapter.cs" />
+ <Compile Include="UnitOfWork\ActiveRecordUnitOfWorkFactory.cs" />
+ <Compile Include="UnitOfWork\IActiveRecordUnitOfWork.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\Rhino.Commons.Clr\Rhino.Commons.Clr-vs2008.csproj">
+ <Project>{77693BCD-4C8A-4523-AEE7-8AB46C1034E7}</Project>
+ <Name>Rhino.Commons.Clr</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Rhino.Commons.NHibernate\Rhino.Commons.NHibernate-v2008.csproj">
+ <Project>{BF4E220E-5AF8-4448-ABA9-981D69AB8775}</Project>
+ <Name>Rhino.Commons.NHibernate</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Rhino.Commons\Rhino.Commons-vs2008.csproj">
+ <Project>{F6321543-E1EC-4999-A562-D9F060C8E3DF}</Project>
+ <Name>Rhino.Commons</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\ayende-open-source.snk">
+ <Link>ayende-open-source.snk</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
- -->
+ -->
</Project>
67 Rhino.Commons.Binsor/AbstractConfigurationRunner.cs
View
@@ -24,11 +24,10 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-using System;
-using Castle.Core;
-using Castle.MicroKernel;
+#endregion
+
+using System;
+using Castle.MicroKernel;
using Castle.Windsor;
namespace Rhino.Commons.Binsor
@@ -50,34 +49,38 @@ public static IKernel Kernel
public static IDisposable UseLocalContainer(IWindsorContainer container)
{
- localContainer = container;
- return new DisposableAction(delegate { localContainer = null; });
- }
-
- public static IDisposable CaptureRegistrations()
- {
- localContainer.Kernel.ComponentRegistered +=new ComponentDataDelegate(AddSecondPassRegistration);
-
- // we should get components already registered.
- foreach ( GraphNode node in localContainer.Kernel.GraphNodes)
- {
- ComponentModel model = node as ComponentModel;
- if (model == null)
- continue;
- AddSecondPassRegistration(model.Name, localContainer.Kernel.GetHandler(model.Name));
- }
- return new DisposableAction(delegate {
- localContainer.Kernel.ComponentRegistered -=
- new ComponentDataDelegate(AddSecondPassRegistration); });
- }
-
- static void AddSecondPassRegistration(string key, IHandler handler)
- {
- Component component;
- if (false == BooReader.TryGetComponentByName(key, out component))
- BooReader.NeedSecondPassRegistrations.Add(new Component(key, handler.Service, handler.ComponentModel.Implementation));
+ return new ContainerScope(container);
+ }
+
+ protected void Run(IWindsorContainer container, Action registrations)
+ {
+ if (localContainer == null)
+ {
+ BooReader.Execute(container, registrations);
+ }
+ else
+ {
+ registrations();
+ }
}
- public abstract void Run();
+ public abstract void Run();
+
+ #region Nested Class: ContainerScope
+
+ class ContainerScope : IDisposable
+ {
+ public ContainerScope(IWindsorContainer container)
+ {
+ localContainer = container;
+ }
+
+ public void Dispose()
+ {
+ localContainer = null;
+ }
+ }
+
+ #endregion
}
}
19 Rhino.Commons.Binsor/BinsorCompilerStep.cs
View
@@ -44,7 +44,8 @@ internal class BinsorCompilerStep : ImplicitBaseClassCompilerStep
"Rhino.Commons.Binsor.BinsorGlobalMethods",
"Rhino.Commons.Binsor.Macros",
"Rhino.Commons.Binsor.Configuration",
- "Castle.Core"
+ "Castle.Windsor",
+ "Castle.Core",
};
public BinsorCompilerStep(params string[] namespaces)
@@ -60,28 +61,20 @@ public BinsorCompilerStep(string environment, params string[] namespaces)
}
protected override void ExtendBaseClass(TypeDefinition definition)
- {
- Property property = new Property("Environment");
- property.Getter = new Method("getter_Environment");
- property.Getter.Body.Add(
- new ReturnStatement(
- new StringLiteralExpression(environment ?? "")
- )
- );
+ {
+ var property = new Property("_Environment") { Getter = new Method("getter__Environment") };
+ property.Getter.Body.Add(new ReturnStatement(new StringLiteralExpression(environment ?? "")));
definition.Members.Add(property);
}
private static string[] GetEffectiveNamespaces(string[] namespaces)
{
if (namespaces == null || namespaces.Length == 0)
- {
return DefaultNamespaces;
- }
- string[] ns = new string[DefaultNamespaces.Length + namespaces.Length];
+ var ns = new string[DefaultNamespaces.Length + namespaces.Length];
DefaultNamespaces.CopyTo(ns, 0);
namespaces.CopyTo(ns, DefaultNamespaces.Length);
-
return ns;
}
}
31 Rhino.Commons.Binsor/BinsorGlobalMethods.cs
View
@@ -16,7 +16,7 @@ public static Type GetFirstInterface(this Type type)
public static Type GetFirstInterface(Type type)
#endif
{
- return GetFirstInterface(type, delegate { return true; });
+ return GetFirstInterface(type, _ => true);
}
[Boo.Lang.Extension]
@@ -30,9 +30,9 @@ public static Type GetFirstInterface(Type type, Predicate<Type> match)
interfaces = Array.FindAll(interfaces, match);
if(interfaces.Length!=1)
{
- throw new InvalidOperationException(
- "Could not find service interface for "+ type +" because it implements "+interfaces.Length +" interfaces matching the given predicate."+ Environment.NewLine +
- "GetFirstInterface() will only work on types implementing a single interface.");
+ throw new InvalidOperationException(
+ String.Format("Could not find service interface for {0} because it implements {1} interfaces matching the given predicate.{2}GetFirstInterface() will only work on types implementing a single interface.",
+ type, interfaces.Length, Environment.NewLine));
}
return interfaces[0];
}
@@ -46,10 +46,7 @@ public static Type GetFirstInterface(Type type, Predicate<Type> match)
/// <returns></returns>
public static TypeEnumerable AllTypesBased<T>(params string[] assemblyNames)
{
- return new TypeEnumerable(AllTypesInternal(assemblyNames, delegate(Type type)
- {
- return typeof(T).IsAssignableFrom(type);
- }));
+ return new TypeEnumerable(AllTypesInternal(assemblyNames, type => typeof(T).IsAssignableFrom(type)));
}
/// <summary>
@@ -59,17 +56,14 @@ public static TypeEnumerable AllTypesBased<T>(params string[] assemblyNames)
/// <returns></returns>
public static TypeEnumerable AllTypes(params string[] assemblyNames)
{
- return new TypeEnumerable(AllTypesInternal(assemblyNames, delegate
- {
- return true;
- }));
+ return new TypeEnumerable(AllTypesInternal(assemblyNames, _ => true));
}
private static IEnumerable<Type> AllTypesInternal(string[] assemblyNames, Predicate<Type> match)
{
- foreach (Assembly assembly in AllAssemblies(assemblyNames))
+ foreach (var assembly in AllAssemblies(assemblyNames))
{
- foreach (Type type in assembly.GetTypes())
+ foreach (var type in assembly.GetTypes())
{
if (type.IsClass == false || type.IsAbstract)
continue;
@@ -82,10 +76,7 @@ private static IEnumerable<Type> AllTypesInternal(string[] assemblyNames, Predic
public static TypeEnumerable AllTypesWithAttribute<T>(params string[] assemblyNames)
{
- return new TypeEnumerable(AllTypesInternal(assemblyNames, delegate(Type type)
- {
- return type.IsDefined(typeof(T), true);
- }));
+ return new TypeEnumerable(AllTypesInternal(assemblyNames, type => type.IsDefined(typeof(T), true)));
}
/// <summary>
@@ -95,8 +86,8 @@ public static TypeEnumerable AllTypesWithAttribute<T>(params string[] assemblyNa
/// <param name="assemblyNames">The assembly names.</param>
public static IEnumerable<Assembly> AllAssemblies(params string[] assemblyNames)
{
- List<Assembly> assemblies = new List<Assembly>();
- foreach (string assembly in assemblyNames)
+ var assemblies = new List<Assembly>();
+ foreach (var assembly in assemblyNames)
{
try
{
12 Rhino.Commons.Binsor/BooComponentInstaller.cs
View
@@ -29,12 +29,12 @@
#endregion
namespace Rhino.Commons.Binsor
-{
- using System;
- using Castle.MicroKernel;
- using Castle.Windsor;
- using Castle.Core.Resource;
- using Castle.MicroKernel.SubSystems.Resource;
+{
+ using System;
+ using Castle.Core.Resource;
+ using Castle.MicroKernel.SubSystems.Configuration;
+ using Castle.Windsor;
+
public class BooComponentInstaller : IComponentsInstaller
{
private readonly string fileName;
215 Rhino.Commons.Binsor/BooReader.cs
View
@@ -51,49 +51,6 @@ public static class BooReader
{
private static readonly BooToken tokenThatIsNeededToKeepReferenceToTheBooParserAssembly = new BooToken();
- internal static ICollection<INeedSecondPassRegistration> NeedSecondPassRegistrations
- {
- get
- {
- ICollection<INeedSecondPassRegistration> data = (ICollection<INeedSecondPassRegistration>)
- Local.Data[tokenThatIsNeededToKeepReferenceToTheBooParserAssembly];
- if (data == null)
- {
- Local.Data[tokenThatIsNeededToKeepReferenceToTheBooParserAssembly] =
- data = new List<INeedSecondPassRegistration>();
- }
- return data;
- }
- set { Local.Data[tokenThatIsNeededToKeepReferenceToTheBooParserAssembly] = value; }
- }
-
- public static bool TryGetComponentByName(string name, out Component component)
- {
- component = null;
- foreach (INeedSecondPassRegistration secondPassRegistration in NeedSecondPassRegistrations)
- {
- Component c = secondPassRegistration as Component;
- if (c == null)
- continue;
- if (c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase))
- {
- component = c;
- return true;
- }
- }
- return false;
-
- }
-
- public static Component GetComponentByName(string name)
- {
- Component component;
-
- if (!TryGetComponentByName(name, out component))
- throw new InvalidOperationException("Could not find component named: " + name);
- return component;
- }
-
public static AbstractConfigurationRunner Read(IWindsorContainer container, CustomUri uri, string name, params string[] namespaces)
{
return Read(container, uri, name, name, namespaces);
@@ -113,17 +70,9 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, stri
IWindsorContainer container, string fileName, string environment,
GenerationOptions generationOptions, params string[] namespaces)
{
- try
- {
- AbstractConfigurationRunner conf = GetConfigurationInstanceFromFile(
- fileName, environment, container, generationOptions, namespaces);
- Execute(container, conf);
- return conf;
- }
- finally
- {
- NeedSecondPassRegistrations = null;
- }
+ var conf = GetConfigurationInstanceFromFile(fileName, environment, container, generationOptions, namespaces);
+ Execute(container, conf);
+ return conf;
}
public static AbstractConfigurationRunner Read(
@@ -131,55 +80,28 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, stri
GenerationOptions generationOptions, string name,
string environment, params string[] namespaces)
{
- try
- {
- using (AbstractConfigurationRunner.UseLocalContainer(container))
- {
- AbstractConfigurationRunner conf = GetConfigurationInstanceFromResource(
- name, environment, container, uri, generationOptions, namespaces);
-
- using (AbstractConfigurationRunner.CaptureRegistrations())
- {
- conf.Run();
- }
-
- foreach (INeedSecondPassRegistration needSecondPassRegistration in NeedSecondPassRegistrations)
- {
- needSecondPassRegistration.RegisterSecondPass();
- }
-
- return conf;
- }
- }
- finally
- {
- NeedSecondPassRegistrations = null;
+ using (AbstractConfigurationRunner.UseLocalContainer(container))
+ {
+ var conf = GetConfigurationInstanceFromResource(name, environment, container, uri, generationOptions, namespaces);
+ conf.Run();
+ return conf;
}
}
public static void Execute(IWindsorContainer container, AbstractConfigurationRunner abstractConfiguration)
- {
- try
- {
- using(AbstractConfigurationRunner.UseLocalContainer(container))
- {
- using (AbstractConfigurationRunner.CaptureRegistrations())
- {
- abstractConfiguration.Run();
- }
-
- foreach(INeedSecondPassRegistration needSecondPassRegistration in NeedSecondPassRegistrations)
- {
- needSecondPassRegistration.RegisterSecondPass();
- }
- }
- }
- finally
- {
- NeedSecondPassRegistrations = null;
- }
+ {
+ Execute(container, () => abstractConfiguration.Run());
+ }
+
+ public static void Execute(IWindsorContainer container, Action registrations)
+ {
+ using (AbstractConfigurationRunner.UseLocalContainer(container))
+ {
+ registrations();
+ }
}
+
public static AbstractConfigurationRunner Read(IWindsorContainer container, Stream stream, string name, params string[] namespaces)
{
return Read(container, stream, name, "", namespaces);
@@ -204,26 +126,11 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
GenerationOptions generationOptions, string name,
string environment, params string[] namespaces)
{
- try
- {
- using (AbstractConfigurationRunner.UseLocalContainer(container))
- {
- AbstractConfigurationRunner conf = GetConfigurationInstanceFromStream(
- name, environment, container, stream, generationOptions, namespaces);
- using (AbstractConfigurationRunner.CaptureRegistrations())
- {
- conf.Run();
- }
- foreach (INeedSecondPassRegistration needSecondPassRegistration in NeedSecondPassRegistrations)
- {
- needSecondPassRegistration.RegisterSecondPass();
- }
- return conf;
- }
- }
- finally
- {
- NeedSecondPassRegistrations = null;
+ using (AbstractConfigurationRunner.UseLocalContainer(container))
+ {
+ var conf = GetConfigurationInstanceFromStream(name, environment, container, stream, generationOptions, namespaces);
+ conf.Run();
+ return conf;
}
}
@@ -231,9 +138,9 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
string fileName, string environment, IWindsorContainer container,
GenerationOptions generationOptions, params string[] namespaces)
{
- string baseDirectory = Path.GetDirectoryName(fileName);
- UrlResolverDelegate urlResolver = CreateWindorUrlResolver(container);
- using (TextReader reader = urlResolver(fileName, null))
+ string baseDirectory = Path.GetDirectoryName(fileName);
+ var urlResolver = CreateWindorUrlResolver(container);
+ using (var reader = urlResolver(fileName, null))
{
return GetConfigurationInstance(
Path.GetFileNameWithoutExtension(fileName), environment,
@@ -247,12 +154,11 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
public static AbstractConfigurationRunner GetConfigurationInstanceFromResource(
string name, string environment, IWindsorContainer container, CustomUri uri,
GenerationOptions generationOptions, params string[] namespaces)
- {
- IResourceSubSystem system =
- (IResourceSubSystem)container.Kernel.GetSubSystem(SubSystemConstants.ResourceKey);
- IResource resource = system.CreateResource(uri);
- string baseDirectory = Path.GetDirectoryName(uri.Path);
- UrlResolverDelegate urlResolver = CreateWindorUrlResolver(container);
+ {
+ var system = (IResourceSubSystem)container.Kernel.GetSubSystem(SubSystemConstants.ResourceKey);
+ var resource = system.CreateResource(uri);
+ string baseDirectory = Path.GetDirectoryName(uri.Path);
+ var urlResolver = CreateWindorUrlResolver(container);
return GetConfigurationInstance(
name, environment, new ReaderInput(name, resource.GetStreamReader()),
generationOptions, new AutoReferenceFilesCompilerStep(baseDirectory,urlResolver),
@@ -261,9 +167,9 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
public static AbstractConfigurationRunner GetConfigurationInstanceFromStream(
string name, string environment, IWindsorContainer container, Stream stream,
GenerationOptions generationOptions, params string[] namespaces)
- {
- UrlResolverDelegate urlResolver = CreateWindorUrlResolver(container);
- using (StreamReader reader = new StreamReader(stream))
+ {
+ var urlResolver = CreateWindorUrlResolver(container);
+ using (var reader = new StreamReader(stream))
{
return GetConfigurationInstance(
name, environment, new ReaderInput(name, reader),
@@ -276,13 +182,13 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
string name, string environment, ICompilerInput input,
GenerationOptions generationOptions, ICompilerStep autoReferenceStep,
params string[] namespaces)
- {
- BooCompiler compiler = new BooCompiler();
- compiler.Parameters.Ducky = true;
- if (generationOptions == GenerationOptions.Memory)
- compiler.Parameters.Pipeline = new CompileToMemory();
- else
- compiler.Parameters.Pipeline = new CompileToFile();
+ {
+ var compiler = new BooCompiler();
+ compiler.Parameters.Ducky = true;
+ compiler.Parameters.Pipeline =
+ generationOptions == GenerationOptions.Memory ?
+ new CompileToMemory() :
+ new CompileToFile();
compiler.Parameters.Pipeline.Insert(1, autoReferenceStep);
compiler.Parameters.Pipeline.Insert(2, new BinsorCompilerStep(environment, namespaces));
@@ -290,21 +196,21 @@ public static AbstractConfigurationRunner Read(IWindsorContainer container, Stre
typeof (ProcessMethodBodiesWithDuckTyping),
new TransformUnknownReferences());
compiler.Parameters.Pipeline.InsertAfter(typeof (TransformUnknownReferences),
- new RegisterComponentAndFacilitiesAfterCreation());
+ new RegisterAfterCreation());
compiler.Parameters.OutputType = CompilerOutputType.Library;
compiler.Parameters.Input.Add(input);
compiler.Parameters.References.Add(typeof (BooReader).Assembly);
compiler.Parameters.References.Add(typeof (MacroMacro).Assembly);
- TryAddAssembliesReferences(compiler.Parameters, "Rhino.Commons.NHibernate", "Rhino.Commons.ActiveRecord");
-
- CompilerContext run = compiler.Run();
+ TryAddAssembliesReferences(compiler.Parameters, "Rhino.Commons.NHibernate", "Rhino.Commons.ActiveRecord");
+
+ var run = compiler.Run();
if (run.Errors.Count != 0)
{
throw new CompilerError(string.Format("Could not compile configuration! {0}", run.Errors.ToString(true)));
- }
- Type type = run.GeneratedAssembly.GetType(name.Replace('.', '_'));
+ }
+ var type = run.GeneratedAssembly.GetType(name.Replace('.', '_'));
return Activator.CreateInstance(type) as AbstractConfigurationRunner;
}
@@ -330,29 +236,22 @@ private static void TryAddAssembliesReferences(CompilerParameters cp, params str
}
private static UrlResolverDelegate CreateWindorUrlResolver(IWindsorContainer container)
- {
- IResourceSubSystem subSystem = (IResourceSubSystem)
- container.Kernel.GetSubSystem(SubSystemConstants.ResourceKey);
+ {
+ var subSystem = (IResourceSubSystem) container.Kernel.GetSubSystem(SubSystemConstants.ResourceKey);
- return delegate(string url, string basePath)
+ return (url, basePath) =>
{
- IResource resource;
-
if (url.IndexOf(':') < 0)
{
url = "file://" + url;
- }
+ }
+
+ var resource = string.IsNullOrEmpty(basePath)
+ ? subSystem.CreateResource(url)
+ : subSystem.CreateResource(url, basePath);
- if (!string.IsNullOrEmpty(basePath))
- {
- resource = subSystem.CreateResource(url, basePath);
- }
- else
- {
- resource = subSystem.CreateResource(url);
- }
using (resource)
- using (TextReader reader = resource.GetStreamReader())
+ using (var reader = resource.GetStreamReader())
return new StringReader(reader.ReadToEnd());
};
}
66 Rhino.Commons.Binsor/Component.cs
View
@@ -30,6 +30,7 @@
namespace Rhino.Commons.Binsor
{
using System;
+ using System.Linq;
using System.Collections;
using System.Collections.Generic;
using Boo.Lang;
@@ -39,7 +40,7 @@ namespace Rhino.Commons.Binsor
using Castle.MicroKernel.Registration;
using Rhino.Commons.Binsor.Configuration;
- public class Component : IQuackFu, INeedSecondPassRegistration, IConfigurationFormatter
+ public class Component : IRegisterable, IQuackFu, IConfigurationFormatter
{
private readonly string _name;
private readonly IEnumerable<Type> _services;
@@ -54,48 +55,41 @@ public class Component : IQuackFu, INeedSecondPassRegistration, IConfigurationFo
//important, we need to get this when we create the component, because we need
//to support nested components
- internal readonly IKernel kernel = AbstractConfigurationRunner.IoC.Container.Kernel;
+ private readonly IKernel kernel = AbstractConfigurationRunner.IoC.Container.Kernel;
#region Constructors
- public Component(Type service,
- params IComponentExtension[] extensions)
+ public Component(Type service, params IComponentExtension[] extensions)
: this(service, service, extensions)
{
}
- public Component(Type service, Type impl,
- params IComponentExtension[] extensions)
+ public Component(Type service, Type impl, params IComponentExtension[] extensions)
: this(impl.FullName, service, impl, extensions)
{
}
- public Component(IEnumerable<Type> services, Type impl,
- params IComponentExtension[] extensions)
+ public Component(IEnumerable<Type> services, Type impl, params IComponentExtension[] extensions)
: this(impl.FullName, services, impl, extensions)
{
}
- public Component(string name, Type service,
- params IComponentExtension[] extensions)
+ public Component(string name, Type service, params IComponentExtension[] extensions)
: this(name, service, service, extensions)
{
}
- public Component(string name, Type service, Type impl,
- params IComponentExtension[] extensions)
+ public Component(string name, Type service, Type impl, params IComponentExtension[] extensions)
: this(name, new Type[] { service }, impl, extensions )
{
}
- public Component(string name, IEnumerable<Type> services, Type impl,
- params IComponentExtension[] extensions)
+ public Component(string name, IEnumerable<Type> services, Type impl, params IComponentExtension[] extensions)
{
_name = name;
_services = services;
_impl = impl;
_extensions = extensions;
- BooReader.NeedSecondPassRegistrations.Add(this);
}
#endregion
@@ -129,12 +123,12 @@ public Component(string name, Type service, Type impl, IDictionary configuration
#endregion
- public string Name
+ protected internal string Name
{
get { return _name; }
}
- public IConfiguration Configuration
+ protected internal IConfiguration Configuration
{
get
{
@@ -143,7 +137,7 @@ public IConfiguration Configuration
}
}
- public IDictionary Dependencies
+ protected internal IDictionary Dependencies
{
get { return _dependencies; }
}
@@ -153,23 +147,12 @@ internal ComponentRegistration Registration
get { return _registration; }
}
- public Component Register()
- {
- foreach (Type serviceType in _services)
- {
- if (_registration == null)
- {
- _registration = new ComponentRegistration(serviceType);
- _registration.Named(_name).ImplementedBy(_impl)
- .DependsOn(_dependencies);
+ public void Register()
+ {
+ _registration = new ComponentRegistration(_services.ToArray());
+ _registration.Named(_name).ImplementedBy(_impl).DependsOn(_dependencies);
- RegisterExtensions(_extensions);
- }
- else
- {
- _registration.Forward(serviceType);
- }
- }
+ RegisterExtensions(_extensions);
if (_lifestyle.HasValue)
{
@@ -179,31 +162,24 @@ public Component Register()
kernel.Register(_registration);
_dependencies.Clear();
-
- return this;
}
internal void RegisterExtensions(IEnumerable<IComponentExtension> extensions)
{
if (extensions != null)
{
- EnsureConfiguration(null);
-
- foreach (IComponentExtension extension in extensions)
+ EnsureConfiguration(null);
+
+ foreach (var extension in extensions)
{
extension.Apply(this, _registration);
}
}
}
- public void RegisterSecondPass()
- {
- kernel.RegisterCustomDependencies(_name, _dependencies);
- }
-
public object QuackGet(string name, object[] property_dependencies)
{
- if(property_dependencies!=null && property_dependencies.Length>0)
+ if (property_dependencies!=null && property_dependencies.Length>0)
{
return _attributes[property_dependencies[0]];
}
33 Rhino.Commons.Binsor/ComponentReference.cs
View
@@ -1,13 +1,15 @@
namespace Rhino.Commons.Binsor
-{
- using System;
- using Castle.Core.Configuration;
- using Configuration;
+{
+ using System;
+ using Castle.Core.Configuration;
+ using Castle.MicroKernel;
+ using Configuration;
+ using ComponentReg = Castle.MicroKernel.Registration.Component;
- public class ComponentReference : IConfigurationFormatter, INeedSecondPassRegistration
+ public class ComponentReference : IConfigurationFormatter
{
private readonly string _name;
- private readonly Type _service;
+ private readonly IKernel kernel = AbstractConfigurationRunner.IoC.Container.Kernel;
public ComponentReference(string name)
{
@@ -17,8 +19,11 @@ public ComponentReference(string name)
public ComponentReference(Type service)
{
_name = service.FullName;
- _service = service;
- BooReader.NeedSecondPassRegistrations.Add(this);
+
+ if (kernel.HasComponent(_name) == false)
+ {
+ kernel.Register(ComponentReg.For(service).Named(_name));
+ }
}
public ComponentReference(Component component)
@@ -38,18 +43,10 @@ public void Format(IConfiguration parent, string name, bool useAttribute)
parent.Attributes.Add(name, _name);
}
else
- {
- string reference = "${" + _name + "}";
+ {
+ string reference = String.Format("${{{0}}}", _name);
ConfigurationHelper.CreateChild(parent, name, reference);
}
}
-
- public void RegisterSecondPass()
- {
- if (!AbstractConfigurationRunner.IoC.Container.Kernel.HasComponent(_name))
- {
- AbstractConfigurationRunner.IoC.Container.AddComponent(_name, _service);
- }
- }
}
}
1  Rhino.Commons.Binsor/Configuration/AttributeBuilder.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
namespace Rhino.Commons.Binsor.Configuration
{
using Castle.Core.Configuration;
1  Rhino.Commons.Binsor/Configuration/ChildBuilder.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using Castle.Core.Configuration;
namespace Rhino.Commons.Binsor.Configuration
9 Rhino.Commons.Binsor/Configuration/ConfigurationHelper.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using System;
using System.Collections;
using Castle.Core.Configuration;
@@ -46,9 +45,9 @@ public static class ConfigurationHelper
{
string value = null;
- if (dictionary != null && !string.IsNullOrEmpty(valueKey))
+ if (dictionary != null && string.IsNullOrEmpty(valueKey) == false)
{
- object valueItem = dictionary[valueKey];
+ var valueItem = dictionary[valueKey];
if (valueItem != null)
{
value = valueItem.ToString();
@@ -56,7 +55,7 @@ public static class ConfigurationHelper
}
}
- if (!string.IsNullOrEmpty(name))
+ if (string.IsNullOrEmpty(name) == false)
{
parent = CreateChild(parent, name, value);
}
@@ -65,7 +64,7 @@ public static class ConfigurationHelper
{
foreach(DictionaryEntry entry in dictionary)
{
- IConfigurationBuilder builder = entry.Key as IConfigurationBuilder;
+ var builder = entry.Key as IConfigurationBuilder;
if (builder != null)
{
builder.Build(parent, entry.Value);
1  Rhino.Commons.Binsor/Configuration/IConfigurationBuilder.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using Castle.Core.Configuration;
namespace Rhino.Commons.Binsor.Configuration
1  Rhino.Commons.Binsor/Configuration/IConfigurationFormatter.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using Castle.Core.Configuration;
namespace Rhino.Commons.Binsor.Configuration
11 Rhino.Commons.Binsor/Configuration/KeyMapBuilder.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using System.Collections;
using Castle.Core.Configuration;
@@ -61,17 +60,17 @@ public string item
public void Build(IConfiguration parent, object value)
{
- IDictionary map = (IDictionary)value;
+ var map = (IDictionary)value;
- if (!string.IsNullOrEmpty(_name))
+ if (string.IsNullOrEmpty(_name) == false)
{
- IConfiguration config = ConfigurationHelper.CreateChild(parent, _name, null);
+ var config = ConfigurationHelper.CreateChild(parent, _name, null);
parent = config;
}
foreach (DictionaryEntry entry in map)
{
- IConfigurationBuilder builder = entry.Key as IConfigurationBuilder;
+ var builder = entry.Key as IConfigurationBuilder;
if (builder != null)
{
builder.Build(parent, entry.Value);
@@ -87,7 +86,7 @@ protected virtual void Build(IConfiguration parent, DictionaryEntry entry)
{
string keyName = entry.Key.ToString();
ConfigurationHelper.SetConfigurationValue(parent, _item, entry.Value, null, false);
- IConfiguration child = parent.Children[parent.Children.Count - 1];
+ var child = parent.Children[parent.Children.Count - 1];
child.Attributes[_key] = keyName;
}
}
8 Rhino.Commons.Binsor/Configuration/KeyValuesBuilder.cs
View
@@ -32,10 +32,8 @@ namespace Rhino.Commons.Binsor.Configuration
{
using System;
using System.Collections;
- using Castle.Core.Configuration;
- using global::Boo.Lang.Compiler.Ast;
- using global::Boo.Lang.Compiler.MetaProgramming;
-
+ using Castle.Core.Configuration;
+
public class KeyValuesBuilder : KeyMapBuilder
{
private string _value = "value";
@@ -57,7 +55,7 @@ public string value
protected override void Build(IConfiguration parent, DictionaryEntry entry)
{
- IConfiguration child = ConfigurationHelper.CreateChild(parent, item, null);
+ var child = ConfigurationHelper.CreateChild(parent, item, null);
child.Attributes[key] = entry.Key.ToString();
ConfigurationHelper.SetConfigurationValue(child, _value, entry.Value, null, true);
}
5 Rhino.Commons.Binsor/Configuration/ListBuilder.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using System.Collections;
using Castle.Core.Configuration;
@@ -61,11 +60,11 @@ public string value
public void Build(IConfiguration parent, object configValue)
{
- ICollection list = (ICollection)configValue;
+ var list = (ICollection)configValue;
if (!string.IsNullOrEmpty(_name))
{
- IConfiguration config = ConfigurationHelper.CreateChild(parent, _name, null);
+ var config = ConfigurationHelper.CreateChild(parent, _name, null);
parent = config;
}
8 Rhino.Commons.Binsor/ContainerAdapter.cs
View
@@ -1,11 +1,13 @@
-using System;
+using System;
+using Castle.MicroKernel;
using Castle.Windsor;
namespace Rhino.Commons.Binsor
{
public class ContainerAdapter
{
- private readonly IWindsorContainer container;
+ private readonly IWindsorContainer container;
+ private static readonly Arguments NoArguments = new Arguments();
public ContainerAdapter(IWindsorContainer container)
{
@@ -19,7 +21,7 @@ public object Resolve(Type serviceType)
public object Resolve(string serviceName)
{
- return Container.Resolve(serviceName);
+ return Container.Resolve<object>(serviceName, NoArguments);
}
public object Resolve(Type serviceType, string serviceName)
107 Rhino.Commons.Binsor/Extend.cs
View
@@ -1,107 +0,0 @@
-#region license
-// Copyright (c) 2005 - 2007 Ayende Rahien (ayende@ayende.com)
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without modification,
-// are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of Ayende Rahien nor the names of its
-// contributors may be used to endorse or promote products derived from this
-// software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-
-namespace Rhino.Commons.Binsor
-{
- using System;
- using System.Collections.Generic;
- using Boo.Lang;
- using Castle.Core.Configuration;
- using Configuration;
-
- public class Extend : IQuackFu, INeedSecondPassRegistration, IConfigurationFormatter
- {
- private readonly Component component;
- private readonly IEnumerable<Type> forwardedTypes;
-
- public Extend(string name, params IComponentExtension[] extensions)
- {
- component = BooReader.GetComponentByName(name);
- BooReader.NeedSecondPassRegistrations.Add(this);
- component.RegisterExtensions(extensions);
- }
-
- public Extend(ComponentReference reference, params IComponentExtension[] extensions)
- : this(reference.Name, extensions)
- {
- }
-
- public Extend(string name, Type forwaredType, params IComponentExtension[] extensions)
- : this(name, new Type[] { forwaredType }, extensions)
- {
- }
-
- public Extend(ComponentReference reference, Type forwaredType, params IComponentExtension[] extensions)
- : this(reference.Name, forwaredType, extensions)
- {
- }
-
- public Extend(string name, IEnumerable<Type> forwardedTypes, params IComponentExtension[] extensions)
- : this(name, extensions)
- {
- this.forwardedTypes = forwardedTypes;
- }
-
- public Extend(ComponentReference reference, IEnumerable<Type> forwardedTypes, params IComponentExtension[] extensions)
- : this(reference.Name, forwardedTypes, extensions)
- {
- }
-
- public void Format(IConfiguration parent, string name, bool useAttribute)
- {
- component.Format(parent, name, useAttribute);
- }
-
- public object QuackGet(string name, object[] parameters)
- {
- return component.QuackGet(name, parameters);
- }
-
- public object QuackSet(string name, object[] parameters, object value)
- {
- return component.QuackSet(name, parameters, value);
- }
-
- public object QuackInvoke(string name, params object[] args)
- {
- return component.QuackInvoke(name, args);
- }
-
- public void RegisterSecondPass()
- {
- if (forwardedTypes != null)
- {
- foreach (Type forwardedType in forwardedTypes)
- {
- component.kernel.RegisterHandlerForwarding(forwardedType, component.Name);
- }
- }
- }
- }
-}
24 Rhino.Commons.Binsor/Extensions/AbstractComponentExtension.cs
View
@@ -26,18 +26,28 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-
-using Castle.MicroKernel.Registration;
+#endregion
+
+using Castle.Core;
+using Castle.MicroKernel;
+using Castle.MicroKernel.ModelBuilder;
+using Castle.MicroKernel.Registration;
namespace Rhino.Commons.Binsor
-{
- public abstract class AbstractComponentExtension : ComponentDescriptor<object>, IComponentExtension
+{
+ public abstract class AbstractComponentExtension : IComponentModelDescriptor, IComponentExtension
{
public virtual void Apply(Component component, ComponentRegistration registration)
{
registration.AddDescriptor(this);
- }
+ }
+
+ public virtual void BuildComponentModel(IKernel kernel, ComponentModel model)
+ {
+ }
+
+ public virtual void ConfigureComponentModel(IKernel kernel, ComponentModel model)
+ {
+ }
}
}
1  Rhino.Commons.Binsor/Extensions/ConfigurationExtension.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using System.Collections;
using Castle.Core.Configuration;
using Castle.MicroKernel.Registration;
42 Rhino.Commons.Binsor/Extensions/EventWireExtension.cs
View
@@ -26,12 +26,12 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-
-using System.Collections;
-using Castle.Core.Configuration;
-using Castle.MicroKernel;
+#endregion
+
+using System.Collections;
+using Castle.Core;
+using Castle.Core.Configuration;
+using Castle.MicroKernel;
namespace Rhino.Commons.Binsor
{
@@ -44,29 +44,31 @@ public EventWireExtension(string eventName, IDictionary subscribers)
{
_eventName = eventName;
_subscribers = subscribers;
- }
-
- protected override void ApplyToConfiguration(IKernel kernel, IConfiguration compConfig)
- {
+ }
+
+ public override void BuildComponentModel(IKernel kernel, ComponentModel model)
+ {
+ var configuration = model.Configuration;
+
if (_subscribers.Count > 0)
- {
- IConfiguration subscribers = ObtainSubscribers(compConfig);
-
- foreach (DictionaryEntry entry in _subscribers)
+ {
+ var subscribers = ObtainSubscribers(configuration);
+
+ foreach (var entry in _subscribers)
{
- IConfiguration subscriber = new MutableConfiguration("subscriber");
- ComponentReference componentId = (ComponentReference)entry.Key;
+ var subscriber = new MutableConfiguration("subscriber");
+ var componentId = (ComponentReference)((DictionaryEntry)entry).Key;
subscriber.Attributes["event"] = _eventName;
- subscriber.Attributes["id"] = componentId.Name;
- subscriber.Attributes["handler"] = entry.Value.ToString();
+ subscriber.Attributes["id"] = ((ComponentReference)componentId).Name;
+ subscriber.Attributes["handler"] = ((DictionaryEntry)entry).Value.ToString();
subscribers.Children.Add(subscriber);
}
}
}
private static IConfiguration ObtainSubscribers(IConfiguration config)
- {
- IConfiguration subscribers = config.Children["subscribers"];
+ {
+ var subscribers = config.Children["subscribers"];
if (subscribers == null)
{
59 Rhino.Commons.Binsor/Extensions/FactorySupportExtension.cs
View
@@ -24,11 +24,12 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#endregion
-
-
-using Castle.Core.Configuration;
-using Castle.MicroKernel;
+#endregion
+
+using System;
+using Castle.Core;
+using Castle.MicroKernel;
+using Castle.MicroKernel.Registration;
namespace Rhino.Commons.Binsor
{
@@ -36,7 +37,8 @@ public class FactorySupportExtension : AbstractComponentExtension
{
private readonly string factoryId;
private readonly string factoryCreate;
- private readonly string instanceAccessor;
+ private readonly string instanceAccessor;
+ private readonly Converter<IKernel, object> factoryMethod;
public FactorySupportExtension(string instanceAccessor)
{
@@ -47,19 +49,38 @@ public FactorySupportExtension(ComponentReference factoryRef, string factoryCrea
{
factoryId = factoryRef.Name;
this.factoryCreate = factoryCreate;
- }
-
- protected override void ApplyToConfiguration(IKernel kernel, IConfiguration compConfig)
- {
- if (instanceAccessor == null)
- {
- compConfig.Attributes["factoryId"] = factoryId;
- compConfig.Attributes["factoryCreate"] = factoryCreate;
- }
- else
- {
- compConfig.Attributes["instance-accessor"] = instanceAccessor;
- }
+ }
+
+ public FactorySupportExtension(Converter<IKernel, object> factoryMethod)
+ {
+ this.factoryMethod = factoryMethod;
+ }
+
+ public override void Apply(Component component, ComponentRegistration registration)
+ {
+ if (factoryMethod == null)
+ {
+ base.Apply(component, registration);
+ }
+ else
+ {
+ registration.UsingFactoryMethod(factoryMethod);
+ }
+ }
+
+ public override void ConfigureComponentModel(IKernel kernel, ComponentModel model)
+ {
+ var confifuration = model.Configuration;
+
+ if (instanceAccessor == null)
+ {
+ confifuration.Attributes["factoryId"] = factoryId;
+ confifuration.Attributes["factoryCreate"] = factoryCreate;
+ }
+ else
+ {
+ confifuration.Attributes["instance-accessor"] = instanceAccessor;
+ }
}
}
}
3  Rhino.Commons.Binsor/Extensions/InterceptorExtension.cs
View
@@ -44,8 +44,7 @@ public InterceptorExtension(Type interceptorType)
public void Apply(Component component, ComponentRegistration registration)
{
AbstractConfigurationRunner.Kernel.Register(
- Castle.MicroKernel.Registration.Component.For(interceptorType)
- .Unless(Castle.MicroKernel.Registration.Component.ServiceAlreadyRegistered)
+ Castle.MicroKernel.Registration.Component.For(interceptorType).OnlyNewServices()
);
registration.Interceptors(InterceptorReference.ForType(interceptorType)).First
63 Rhino.Commons.Binsor/Extensions/LifestyleExtension.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using System;
using Castle.Core;
using Castle.MicroKernel.Registration;
@@ -42,11 +41,17 @@ public abstract class LifestyleExtension : IComponentExtension
public LifestyleExtension(LifestyleType lifestyle)
{
this.lifestyle = lifestyle;
- }
-
- public virtual void Apply(Component component, ComponentRegistration registration)
- {
- registration.LifeStyle.Is(lifestyle);
+ }
+
+ public virtual void Apply<T>(Component component, ComponentRegistration<T> registration)
+ where T : class
+ {
+ registration.LifeStyle.Is(lifestyle);
+ }
+
+ void IComponentExtension.Apply(Component component, ComponentRegistration registration)
+ {
+ Apply(component, registration);
}
}
@@ -104,9 +109,9 @@ public int InitialPoolSize
public int MaxPoolSize
{
set { maxPoolSize = value; }
- }
-
- public override void Apply(Component component, ComponentRegistration registration)
+ }
+
+ public override void Apply<T>(Component component, ComponentRegistration<T> registration)
{
registration.LifeStyle.PooledWithSize(initialPoolSize.GetValueOrDefault(), maxPoolSize.GetValueOrDefault());
}
@@ -123,22 +128,46 @@ public PerWebRequest() : base(LifestyleType.PerWebRequest)
}
}
+ #endregion
+
+ #region Scoped Lifestyle
+
+ public class Scoped : LifestyleExtension
+ {
+ public Scoped() : base(LifestyleType.Scoped)
+ {
+ }
+
+ public Scoped(Type scopeAccessor) : this()
+ {
+ ScopeAccessor = scopeAccessor;
+ }
+
+ public Type ScopeAccessor { get; private set; }
+
+
+ public override void Apply<T>(Component component, ComponentRegistration<T> registration)
+ {
+ registration.LifeStyle.Scoped(ScopeAccessor);
+ }
+ }
+
#endregion
#region Custom Lifestyle
public class Custom : LifestyleExtension
{
- private readonly Type customLifestyleType;
-
public Custom(Type customLifestyleType) : base(LifestyleType.Custom)
{
- this.customLifestyleType = customLifestyleType;
- }
-
- public override void Apply(Component component, ComponentRegistration registration)
- {
- registration.LifeStyle.Custom(customLifestyleType);
+ CustomLifestyleType = customLifestyleType;
+ }
+
+ public Type CustomLifestyleType { get; private set; }
+
+ public override void Apply<T>(Component component, ComponentRegistration<T> registration)
+ {
+ registration.LifeStyle.Custom(CustomLifestyleType);
}
}
53 Rhino.Commons.Binsor/Extensions/OnCreateExtension.cs
View
@@ -0,0 +1,53 @@
+#region license
+// Copyright (c) 2005 - 2007 Ayende Rahien (ayende@ayende.com)
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+// * Neither the name of Ayende Rahien nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#endregion
+
+using System;
+using Castle.MicroKernel.LifecycleConcerns;
+using Castle.MicroKernel.Registration;
+
+namespace Rhino.Commons.Binsor
+{
+ #region OnCreateExtension
+
+ public class OnCreateExtension : IComponentExtension
+ {
+ private readonly LifecycleActionDelegate<object> onCreate;
+
+ public OnCreateExtension(Action<object> onCreate)
+ {
+ this.onCreate = (_, instance) => onCreate(instance);
+ }
+
+ public virtual void Apply(Component component, ComponentRegistration registration)
+ {
+ registration.OnCreate(onCreate);
+ }
+ }
+
+ #endregion
+}
2  Rhino.Commons.Binsor/Extensions/ParametersExtension.cs
View
@@ -12,7 +12,7 @@ public ParametersExtension(IDictionary configuration)
protected override IConfiguration GetRootConfiguration(IConfiguration root)
{
- IConfiguration parameters = root.Children["parameters"];
+ var parameters = root.Children["parameters"];
if (parameters == null)
{
12 Rhino.Commons.Binsor/Extensions/StartableExtension.cs
View
@@ -24,9 +24,15 @@
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+<<<<<<< HEAD
#endregion
using Castle.Facilities.Startable;
+=======
+#endregion
+
+using Castle.Facilities.Startable;
+>>>>>>> UpdateCastle
using Castle.MicroKernel.Registration;
namespace Rhino.Commons.Binsor
@@ -48,12 +54,16 @@ public string StopMethod
void IComponentExtension.Apply(Component component, ComponentRegistration registration)
{
+<<<<<<< HEAD
if (!string.IsNullOrEmpty(startMethod))
+=======
+ if (string.IsNullOrEmpty(startMethod) == false)
+>>>>>>> UpdateCastle
{
registration.StartUsingMethod(startMethod);
}
- if (!string.IsNullOrEmpty(stopMethod))
+ if (string.IsNullOrEmpty(stopMethod) == false)
{
registration.StopUsingMethod(stopMethod);
}
40 Rhino.Commons.Binsor/Facility.cs
View
@@ -40,7 +40,7 @@ namespace Rhino.Commons.Binsor
{
using Boo.Lang;
- public class Facility : IQuackFu
+ public class Facility : IRegisterable, IQuackFu
{
private readonly string _key;
private readonly Type _facility;
@@ -99,26 +99,24 @@ public IDictionary Parameters
get { return _parameters; }
}
- public Facility Register()
+ public void Register()
{
if (_extensions != null)
- {
- foreach (IFacilityExtension extension in _extensions)
+ {
+ foreach (var extension in _extensions)
{
extension.Apply(this);
}
- }
-
- IFacility instance = ObtainFacilityInstance();
+ }
+
+ var instance = ObtainFacilityInstance();
if (_configuration != null)
{
kernel.ConfigurationStore.AddFacilityConfiguration(_key, _configuration);
}
- kernel.AddFacility(_key, instance);
-
- return this;
+ kernel.AddFacility(instance);
}
public object QuackGet(string name, object[] property_parameters)
@@ -141,25 +139,25 @@ private IFacility ObtainFacilityInstance()
if (_facilityInstance != null)
{
return _facilityInstance;
- }
-
- System.Collections.Generic.List<object> parameters = new System.Collections.Generic.List<object>();
- ConstructorInfo constructor = SelectEligbleConstructor(parameters);
+ }
+
+ var parameters = new System.Collections.Generic.List<object>();
+ var constructor = SelectEligbleConstructor(parameters);
return (IFacility) constructor.Invoke(parameters.ToArray());
}
private ConstructorInfo SelectEligbleConstructor(ICollection<object> arguments)
{
- ConstructorInfo[] constructors = _facility.GetConstructors();
-
- foreach (ConstructorInfo constuctorInfo in constructors)
+ var constructors = _facility.GetConstructors();
+
+ foreach (var constuctorInfo in constructors)
{
- ParameterInfo[] parameters = constuctorInfo.GetParameters();
+ var parameters = constuctorInfo.GetParameters();
if (parameters.Length != _parameters.Count) continue;
- arguments.Clear();
-
- foreach (ParameterInfo parameterInfo in parameters)
+ arguments.Clear();
+
+ foreach (var parameterInfo in parameters)
{
if (_parameters.Contains(parameterInfo.Name))
{
1  Rhino.Commons.Binsor/IComponentExtension.cs
View
@@ -26,7 +26,6 @@
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
-
using Castle.MicroKernel.Registration;