Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

release candidate code drop

  • Loading branch information...
commit b897d0c001034ae405686c4229013a2921c14152 0 parents
@serialseb serialseb authored
Showing with 114,047 additions and 0 deletions.
  1. +13 −0 .svnignore
  2. +21 −0 build/aspnet.proj
  3. +22 −0 build/build.proj
  4. +18 −0 build/castle.proj
  5. 0  build/ccnet.build
  6. +20 −0 build/common.properties
  7. +38 −0 build/core.proj
  8. +28 −0 build/defaults.targets
  9. +98 −0 build/dependencymanager.proj
  10. +12 −0 build/deploy/ohloh.xml
  11. +55 −0 build/deploy/ohloh.xsd
  12. 0  build/keys/caff/empty.txt
  13. BIN  build/keys/debug.snk
  14. +223 −0 build/module.targets
  15. +18 −0 build/ninject.proj
  16. +27 −0 build/openbastard.proj
  17. +203 −0 build/releasebuilder.targets
  18. +16 −0 build/sharpview.proj
  19. +35 −0 build/vside.proj
  20. +13 −0 doc/content/Fundamentals/Dependencies/DependenciesOverview.html
  21. +58 −0 doc/content/Fundamentals/Handlers/HandlersOverview.html
  22. +13 −0 doc/content/Fundamentals/Handlers/ParametersParsing.html
  23. +394 −0 doc/content/Tutorials/Create-First-Site.html
  24. +38 −0 doc/content/Tutorials/Download.html
  25. +13 −0 doc/content/Tutorials/ReturningHttpStatusCodes.html
  26. +213 −0 doc/content/Tutorials/UsingForms.html
  27. +24 −0 doc/content/default.html
  28. BIN  doc/content/img/Create-First-Site/2008-12-07_1437.png
  29. BIN  doc/content/img/Create-First-Site/2008-12-07_1438.png
  30. BIN  doc/content/img/Create-First-Site/adding_macpro.swf
  31. BIN  doc/content/img/Create-First-Site/img11.png
  32. BIN  doc/content/img/Create-First-Site/img7.png
  33. BIN  doc/content/img/Create-First-Site/imgD.png
  34. +1 −0  doc/content/updatecontentype.ps1
  35. BIN  lib/castle-1.0.3/Castle.ActiveRecord.dll
  36. +9,091 −0 lib/castle-1.0.3/Castle.ActiveRecord.xml
  37. BIN  lib/castle-1.0.3/Castle.Components.Binder.dll
  38. +348 −0 lib/castle-1.0.3/Castle.Components.Binder.xml
  39. BIN  lib/castle-1.0.3/Castle.Components.Common.EmailSender.dll
  40. +205 −0 lib/castle-1.0.3/Castle.Components.Common.EmailSender.xml
  41. BIN  lib/castle-1.0.3/Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.dll
  42. +91 −0 lib/castle-1.0.3/Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.xml
  43. BIN  lib/castle-1.0.3/Castle.Components.Common.TemplateEngine.dll
  44. +54 −0 lib/castle-1.0.3/Castle.Components.Common.TemplateEngine.xml
  45. BIN  lib/castle-1.0.3/Castle.Components.DictionaryAdapter.dll
  46. +62 −0 lib/castle-1.0.3/Castle.Components.DictionaryAdapter.xml
  47. BIN  lib/castle-1.0.3/Castle.Components.Validator.dll
  48. BIN  lib/castle-1.0.3/Castle.Components.Validator.pdb
  49. +2,938 −0 lib/castle-1.0.3/Castle.Components.Validator.xml
  50. BIN  lib/castle-1.0.3/Castle.Core.dll
  51. +3,049 −0 lib/castle-1.0.3/Castle.Core.xml
  52. BIN  lib/castle-1.0.3/Castle.DynamicProxy.dll
  53. +693 −0 lib/castle-1.0.3/Castle.DynamicProxy.xml
  54. BIN  lib/castle-1.0.3/Castle.DynamicProxy2.dll
  55. +635 −0 lib/castle-1.0.3/Castle.DynamicProxy2.xml
  56. BIN  lib/castle-1.0.3/Castle.Facilities.ActiveRecordIntegration.dll
  57. +38 −0 lib/castle-1.0.3/Castle.Facilities.ActiveRecordIntegration.xml
  58. BIN  lib/castle-1.0.3/Castle.Facilities.AutomaticTransactionManagement.dll
  59. +131 −0 lib/castle-1.0.3/Castle.Facilities.AutomaticTransactionManagement.xml
  60. BIN  lib/castle-1.0.3/Castle.Facilities.BatchRegistration.dll
  61. +28 −0 lib/castle-1.0.3/Castle.Facilities.BatchRegistration.xml
  62. BIN  lib/castle-1.0.3/Castle.Facilities.Cache.dll
  63. +141 −0 lib/castle-1.0.3/Castle.Facilities.Cache.xml
  64. BIN  lib/castle-1.0.3/Castle.Facilities.Db4oIntegration.dll
  65. +33 −0 lib/castle-1.0.3/Castle.Facilities.Db4oIntegration.xml
  66. BIN  lib/castle-1.0.3/Castle.Facilities.DynamicLoader.dll
  67. +205 −0 lib/castle-1.0.3/Castle.Facilities.DynamicLoader.xml
  68. BIN  lib/castle-1.0.3/Castle.Facilities.IBatisNetIntegration.dll
  69. +23 −0 lib/castle-1.0.3/Castle.Facilities.IBatisNetIntegration.xml
  70. BIN  lib/castle-1.0.3/Castle.Facilities.Logging.dll
  71. +75 −0 lib/castle-1.0.3/Castle.Facilities.Logging.xml
  72. BIN  lib/castle-1.0.3/Castle.Facilities.NHibernateIntegration.dll
  73. +1,882 −0 lib/castle-1.0.3/Castle.Facilities.NHibernateIntegration.xml
  74. BIN  lib/castle-1.0.3/Castle.Facilities.Prevalence.dll
  75. +37 −0 lib/castle-1.0.3/Castle.Facilities.Prevalence.xml
  76. BIN  lib/castle-1.0.3/Castle.Facilities.Remoting.TestComponents.dll
  77. +8 −0 lib/castle-1.0.3/Castle.Facilities.Remoting.TestComponents.xml
  78. BIN  lib/castle-1.0.3/Castle.Facilities.Synchronize.dll
  79. +461 −0 lib/castle-1.0.3/Castle.Facilities.Synchronize.xml
  80. BIN  lib/castle-1.0.3/Castle.MicroKernel.dll
  81. +3,682 −0 lib/castle-1.0.3/Castle.MicroKernel.xml
  82. BIN  lib/castle-1.0.3/Castle.MonoRail.ActiveRecordScaffold.dll
  83. +208 −0 lib/castle-1.0.3/Castle.MonoRail.ActiveRecordScaffold.xml
  84. BIN  lib/castle-1.0.3/Castle.MonoRail.ActiveRecordSupport.dll
  85. +400 −0 lib/castle-1.0.3/Castle.MonoRail.ActiveRecordSupport.xml
  86. BIN  lib/castle-1.0.3/Castle.MonoRail.Framework.Views.NVelocity.dll
  87. +389 −0 lib/castle-1.0.3/Castle.MonoRail.Framework.Views.NVelocity.xml
  88. BIN  lib/castle-1.0.3/Castle.MonoRail.Framework.dll
  89. +20,332 −0 lib/castle-1.0.3/Castle.MonoRail.Framework.xml
  90. BIN  lib/castle-1.0.3/Castle.MonoRail.JSONSupport.dll
  91. +129 −0 lib/castle-1.0.3/Castle.MonoRail.JSONSupport.xml
  92. BIN  lib/castle-1.0.3/Castle.MonoRail.TestSupport.dll
  93. +704 −0 lib/castle-1.0.3/Castle.MonoRail.TestSupport.xml
  94. BIN  lib/castle-1.0.3/Castle.MonoRail.TransformFilters.dll
  95. +27 −0 lib/castle-1.0.3/Castle.MonoRail.TransformFilters.xml
  96. BIN  lib/castle-1.0.3/Castle.MonoRail.Views.Brail.dll
  97. +316 −0 lib/castle-1.0.3/Castle.MonoRail.Views.Brail.xml
  98. BIN  lib/castle-1.0.3/Castle.MonoRail.WindsorExtension.dll
  99. +124 −0 lib/castle-1.0.3/Castle.MonoRail.WindsorExtension.xml
  100. BIN  lib/castle-1.0.3/Castle.Services.Logging.Log4netIntegration.dll
  101. +59 −0 lib/castle-1.0.3/Castle.Services.Logging.Log4netIntegration.xml
  102. BIN  lib/castle-1.0.3/Castle.Services.Logging.NLogIntegration.dll
  103. +339 −0 lib/castle-1.0.3/Castle.Services.Logging.NLogIntegration.xml
  104. BIN  lib/castle-1.0.3/Castle.Services.Transaction.dll
  105. +439 −0 lib/castle-1.0.3/Castle.Services.Transaction.xml
  106. BIN  lib/castle-1.0.3/Castle.VSNetIntegration.CastleWizards.dll
  107. +189 −0 lib/castle-1.0.3/Castle.VSNetIntegration.CastleWizards.xml
  108. BIN  lib/castle-1.0.3/Castle.Windsor.dll
  109. +1,238 −0 lib/castle-1.0.3/Castle.Windsor.xml
  110. BIN  lib/castle-1.0.3/es/Castle.Components.Validator.resources.dll
  111. BIN  lib/castle-1.0.3/external-dependencies.zip
  112. BIN  lib/castle-1.0.3/fr/Castle.Components.Validator.resources.dll
  113. BIN  lib/castle-1.0.3/it/Castle.Components.Validator.resources.dll
  114. BIN  lib/castle-1.0.3/lt/Castle.Components.Validator.resources.dll
  115. BIN  lib/castle-1.0.3/lv/Castle.Components.Validator.resources.dll
  116. BIN  lib/castle-1.0.3/nl/Castle.Components.Validator.resources.dll
  117. BIN  lib/castle-1.0.3/pt-BR/Castle.MonoRail.Framework.resources.dll
  118. BIN  lib/castle-1.0.3/pt/Castle.Components.Validator.resources.dll
  119. BIN  lib/castle-1.0.3/zh-TW/Castle.MonoRail.Framework.resources.dll
  120. BIN  lib/castle-1.1.b1007/Castle.ActiveRecord.dll
  121. BIN  lib/castle-1.1.b1007/Castle.ActiveRecord.pdb
  122. +10,158 −0 lib/castle-1.1.b1007/Castle.ActiveRecord.xml
  123. BIN  lib/castle-1.1.b1007/Castle.Components.Binder.dll
  124. BIN  lib/castle-1.1.b1007/Castle.Components.Binder.pdb
  125. +348 −0 lib/castle-1.1.b1007/Castle.Components.Binder.xml
  126. BIN  lib/castle-1.1.b1007/Castle.Components.Common.EmailSender.dll
  127. BIN  lib/castle-1.1.b1007/Castle.Components.Common.EmailSender.pdb
  128. +235 −0 lib/castle-1.1.b1007/Castle.Components.Common.EmailSender.xml
  129. BIN  lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.dll
  130. BIN  lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.pdb
  131. +97 −0 lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.NVelocityTemplateEngine.xml
  132. BIN  lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.dll
  133. BIN  lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.pdb
  134. +54 −0 lib/castle-1.1.b1007/Castle.Components.Common.TemplateEngine.xml
  135. BIN  lib/castle-1.1.b1007/Castle.Components.DictionaryAdapter.dll
  136. BIN  lib/castle-1.1.b1007/Castle.Components.DictionaryAdapter.pdb
  137. +667 −0 lib/castle-1.1.b1007/Castle.Components.DictionaryAdapter.xml
  138. BIN  lib/castle-1.1.b1007/Castle.Components.Pagination.dll
  139. BIN  lib/castle-1.1.b1007/Castle.Components.Pagination.pdb
  140. +279 −0 lib/castle-1.1.b1007/Castle.Components.Pagination.xml
  141. BIN  lib/castle-1.1.b1007/Castle.Components.Scheduler.WindsorExtension.dll
  142. BIN  lib/castle-1.1.b1007/Castle.Components.Scheduler.WindsorExtension.pdb
  143. +24 −0 lib/castle-1.1.b1007/Castle.Components.Scheduler.WindsorExtension.xml
  144. BIN  lib/castle-1.1.b1007/Castle.Components.Scheduler.dll
  145. BIN  lib/castle-1.1.b1007/Castle.Components.Scheduler.pdb
  146. +1,831 −0 lib/castle-1.1.b1007/Castle.Components.Scheduler.xml
  147. BIN  lib/castle-1.1.b1007/Castle.Components.Validator.dll
  148. BIN  lib/castle-1.1.b1007/Castle.Components.Validator.pdb
  149. +3,630 −0 lib/castle-1.1.b1007/Castle.Components.Validator.xml
  150. BIN  lib/castle-1.1.b1007/Castle.Core.dll
  151. BIN  lib/castle-1.1.b1007/Castle.Core.pdb
  152. +3,197 −0 lib/castle-1.1.b1007/Castle.Core.xml
  153. BIN  lib/castle-1.1.b1007/Castle.DynamicProxy.dll
  154. BIN  lib/castle-1.1.b1007/Castle.DynamicProxy.pdb
  155. +693 −0 lib/castle-1.1.b1007/Castle.DynamicProxy.xml
  156. BIN  lib/castle-1.1.b1007/Castle.DynamicProxy2.dll
  157. BIN  lib/castle-1.1.b1007/Castle.DynamicProxy2.pdb
  158. +689 −0 lib/castle-1.1.b1007/Castle.DynamicProxy2.xml
  159. BIN  lib/castle-1.1.b1007/Castle.Facilities.ActiveRecordIntegration.dll
  160. BIN  lib/castle-1.1.b1007/Castle.Facilities.ActiveRecordIntegration.pdb
  161. +963 −0 lib/castle-1.1.b1007/Castle.Facilities.ActiveRecordIntegration.xml
  162. BIN  lib/castle-1.1.b1007/Castle.Facilities.AutomaticTransactionManagement.dll
  163. BIN  lib/castle-1.1.b1007/Castle.Facilities.AutomaticTransactionManagement.pdb
  164. +131 −0 lib/castle-1.1.b1007/Castle.Facilities.AutomaticTransactionManagement.xml
  165. BIN  lib/castle-1.1.b1007/Castle.Facilities.BatchRegistration.dll
  166. BIN  lib/castle-1.1.b1007/Castle.Facilities.BatchRegistration.pdb
  167. +28 −0 lib/castle-1.1.b1007/Castle.Facilities.BatchRegistration.xml
  168. BIN  lib/castle-1.1.b1007/Castle.Facilities.Cache.dll
  169. BIN  lib/castle-1.1.b1007/Castle.Facilities.Cache.pdb
  170. +224 −0 lib/castle-1.1.b1007/Castle.Facilities.Cache.xml
  171. BIN  lib/castle-1.1.b1007/Castle.Facilities.Logging.dll
  172. BIN  lib/castle-1.1.b1007/Castle.Facilities.Logging.pdb
  173. +75 −0 lib/castle-1.1.b1007/Castle.Facilities.Logging.xml
  174. BIN  lib/castle-1.1.b1007/Castle.Facilities.NHibernateIntegration.dll
  175. BIN  lib/castle-1.1.b1007/Castle.Facilities.NHibernateIntegration.pdb
  176. +3,468 −0 lib/castle-1.1.b1007/Castle.Facilities.NHibernateIntegration.xml
  177. BIN  lib/castle-1.1.b1007/Castle.Facilities.Remoting.TestComponents.dll
  178. BIN  lib/castle-1.1.b1007/Castle.Facilities.Remoting.TestComponents.pdb
  179. +8 −0 lib/castle-1.1.b1007/Castle.Facilities.Remoting.TestComponents.xml
  180. BIN  lib/castle-1.1.b1007/Castle.Facilities.Synchronize.dll
  181. BIN  lib/castle-1.1.b1007/Castle.Facilities.Synchronize.pdb
  182. +726 −0 lib/castle-1.1.b1007/Castle.Facilities.Synchronize.xml
  183. BIN  lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.Demo.dll
  184. BIN  lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.Demo.pdb
  185. +34 −0 lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.Demo.xml
  186. BIN  lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.dll
  187. BIN  lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.pdb
  188. +648 −0 lib/castle-1.1.b1007/Castle.Facilities.WcfIntegration.xml
  189. BIN  lib/castle-1.1.b1007/Castle.MicroKernel.dll
  190. BIN  lib/castle-1.1.b1007/Castle.MicroKernel.pdb
  191. +5,379 −0 lib/castle-1.1.b1007/Castle.MicroKernel.xml
  192. BIN  lib/castle-1.1.b1007/Castle.MonoRail.ActiveRecordSupport.dll
  193. BIN  lib/castle-1.1.b1007/Castle.MonoRail.ActiveRecordSupport.pdb
  194. +666 −0 lib/castle-1.1.b1007/Castle.MonoRail.ActiveRecordSupport.xml
  195. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Framework.Views.NVelocity.dll
  196. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Framework.Views.NVelocity.pdb
  197. +348 −0 lib/castle-1.1.b1007/Castle.MonoRail.Framework.Views.NVelocity.xml
  198. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Framework.dll
  199. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Framework.pdb
  200. +26,537 −0 lib/castle-1.1.b1007/Castle.MonoRail.Framework.xml
  201. BIN  lib/castle-1.1.b1007/Castle.MonoRail.TestSupport.dll
  202. BIN  lib/castle-1.1.b1007/Castle.MonoRail.TestSupport.pdb
  203. +478 −0 lib/castle-1.1.b1007/Castle.MonoRail.TestSupport.xml
  204. BIN  lib/castle-1.1.b1007/Castle.MonoRail.TransformFilters.dll
  205. BIN  lib/castle-1.1.b1007/Castle.MonoRail.TransformFilters.pdb
  206. +27 −0 lib/castle-1.1.b1007/Castle.MonoRail.TransformFilters.xml
  207. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Views.AspView.dll
  208. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Views.AspView.pdb
  209. +578 −0 lib/castle-1.1.b1007/Castle.MonoRail.Views.AspView.xml
  210. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Views.Brail.dll
  211. BIN  lib/castle-1.1.b1007/Castle.MonoRail.Views.Brail.pdb
  212. +445 −0 lib/castle-1.1.b1007/Castle.MonoRail.Views.Brail.xml
  213. BIN  lib/castle-1.1.b1007/Castle.MonoRail.WindsorExtension.dll
  214. BIN  lib/castle-1.1.b1007/Castle.MonoRail.WindsorExtension.pdb
  215. +123 −0 lib/castle-1.1.b1007/Castle.MonoRail.WindsorExtension.xml
  216. BIN  lib/castle-1.1.b1007/Castle.Services.Logging.Log4netIntegration.dll
  217. BIN  lib/castle-1.1.b1007/Castle.Services.Logging.Log4netIntegration.pdb
  218. +59 −0 lib/castle-1.1.b1007/Castle.Services.Logging.Log4netIntegration.xml
  219. BIN  lib/castle-1.1.b1007/Castle.Services.Logging.NLogIntegration.dll
  220. BIN  lib/castle-1.1.b1007/Castle.Services.Logging.NLogIntegration.pdb
  221. +339 −0 lib/castle-1.1.b1007/Castle.Services.Logging.NLogIntegration.xml
  222. BIN  lib/castle-1.1.b1007/Castle.Services.Transaction.dll
  223. BIN  lib/castle-1.1.b1007/Castle.Services.Transaction.pdb
  224. +444 −0 lib/castle-1.1.b1007/Castle.Services.Transaction.xml
  225. BIN  lib/castle-1.1.b1007/Castle.Windsor.dll
  226. BIN  lib/castle-1.1.b1007/Castle.Windsor.pdb
Sorry, we could not display the entire diff because too many files (1,304) changed.
13 .svnignore
@@ -0,0 +1,13 @@
+*.dll
+*.obj
+*.lib
+*.user
+*.suo
+.DS_Store
+._*
+bin
+obj
+User.config
+_vti_pvt
+_vti_cnf
+*.ini
21 build/aspnet.proj
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenRasta.Hosting.AspNet\OpenRasta.Hosting.AspNet.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.Hosting.AspNet.Tests.Integration\OpenRasta.Hosting.AspNet.Tests.Integration.csproj">
+ <UnitTest>true</UnitTest>
+ <NUnit-DisableShadowCopy>true</NUnit-DisableShadowCopy>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.Codecs.WebForms\OpenRasta.Codecs.WebForms.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.Codecs.WebForms.Tests.Unit\OpenRasta.Codecs.WebForms.Tests.Unit.csproj">
+ <UnitTest>true</UnitTest>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
22 build/build.proj
@@ -0,0 +1,22 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="BuildAll" ToolsVersion="3.5">
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..</RootPath>
+ <DefaultBuildVersionMajor>2</DefaultBuildVersionMajor>
+ <DefaultBuildVersionMinor>0</DefaultBuildVersionMinor>
+ <DefaultBuildVersionBuild>3</DefaultBuildVersionBuild>
+ <DefaultBuildVersionRevision>0</DefaultBuildVersionRevision>
+ <DefaultBuildVersionSuffix>0</DefaultBuildVersionSuffix>
+
+ <PackageName>OpenRasta</PackageName>
+ <ReleaseName>Trunk</ReleaseName>
+
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Module Include="core.proj;aspnet.proj;castle.proj;ninject.proj;sharpview.proj;vside.proj;openbastard.proj" />
+ <Installer Include="$(RootPath)\src\install\OpenRasta.Installer\OpenRasta.Installer.wixproj"/>
+ </ItemGroup>
+
+ <Import Project="releasebuilder.targets" />
+
+</Project>
18 build/castle.proj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Windsor-1.0.rc3\OpenRasta.DI.Windsor-1.0.rc3.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Windsor-1.0.rc3.Tests.Unit\OpenRasta.DI.Windsor-1.0.rc3.Tests.Unit.csproj">
+ <UnitTest>true</UnitTest>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Windsor\OpenRasta.DI.Windsor.csproj"/>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Windsor.Tests.Unit\OpenRasta.DI.Windsor.Tests.Unit.csproj">
+ <UnitTest>true</UnitTest>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
0  build/ccnet.build
No changes.
20 build/common.properties
@@ -0,0 +1,20 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+
+ <!--Tools-->
+ <PropertyGroup>
+ <SftpPath>$(RootPath)\lib\putty\psftp.exe</SftpPath>
+ <WixToolPath>$(RootPath)\lib\wix-3.0</WixToolPath>
+ <WinExtDir>$(WixToolPath)</WinExtDir>
+ <WixTargetsPath>$(WixToolPath)\Wix.targets</WixTargetsPath>
+ <WixTasksPath>$(WixToolPath)\wixtasks.dll</WixTasksPath>
+ <ILMergePath Condition="'$(ILMergePath)' == ''">$(ProgramFiles)\Microsoft\Ilmerge\Ilmerge.exe</ILMergePath>
+ <ILMergePath Condition="!Exists('$(ILMergePath)')">c:\program files (x86)\Microsoft\Ilmerge\Ilmerge.exe</ILMergePath>
+ <RootLibDirectory>$(RootPath)\lib</RootLibDirectory>
+ <ReportsDirectory>$(RootPath)\reports</ReportsDirectory>
+ <NUnitReportsDirectory>$(ReportsDirectory)\nunit</NUnitReportsDirectory>
+ <MSBuildCommunityTasksPath>$(RootLibDirectory)\msbuildtasks-1.3</MSBuildCommunityTasksPath>
+ <NUnitDirectory>$(RootLibDirectory)\nunit-2.5</NUnitDirectory>
+ </PropertyGroup>
+
+
+</Project>
38 build/core.proj
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenRasta\OpenRasta.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>true</Merged>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.Net30\OpenRasta.Net30.csproj">
+ <MinVersion>30</MinVersion>
+ <Merged>true</Merged>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.Net35\OpenRasta.Net35.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>true</Merged>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.Testing\OpenRasta.Testing.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.Tests.Unit\OpenRasta.Tests.Unit.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ <UnitTest>true</UnitTest>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.Tests.Integration\OpenRasta.Tests.Integration.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ <UnitTest>true</UnitTest>
+ <NUnit-DisableShadowCopy>true</NUnit-DisableShadowCopy>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
28 build/defaults.targets
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!--
+
+ Provides common properties for csproj files
+
+ -->
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..\..\..</RootPath>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <VSObjDirectory>$(RootPath)\bin\vs\obj\$(Configuration)\$(MSBuildProjectName)\</VSObjDirectory>
+ <VSBinDirectory>$(RootPath)\bin\vs\bin\$(Configuration)\$(MSBuildProjectName)\</VSBinDirectory>
+ <CaffeineSignature>$(RootPath)\build\keys\caff\caff.snk</CaffeineSignature>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <IntermediateOutputPath Condition="'$(IntermediateOutputPath)'==''">$(VSObjDirectory)</IntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)' == ''">$(VSBinDirectory)</OutputPath>
+ <DocumentationFile>$(OutputPath)\$(MSBuildProjectName).xml</DocumentationFile>
+ <AssemblyOriginatorKeyFile Condition="!Exists('$(CaffeineSignature)')">$(RootPath)\build\keys\debug.snk</AssemblyOriginatorKeyFile>
+ <AssemblyOriginatorKeyFile Condition="Exists('$(CaffeineSignature)')">$(CaffeineSignature)</AssemblyOriginatorKeyFile>
+
+ <NoWarn>1591;$(NoWarn)</NoWarn>
+ </PropertyGroup>
+
+</Project>
98 build/dependencymanager.proj
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..\..\..</RootPath>
+ <FrameworkProfile Condition="'$(FrameworkProfile)' == ''">35</FrameworkProfile>
+ <OpenRastaLibPath Condition="'$(OpenRastaLibPath)' == ''">$(RootPath)\lib</OpenRastaLibPath>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(CastleWindsor)' != ''">
+ <CastleDirectory
+ Condition="'$(CastleDirectory)' == ''">$(OpenRastaLibPath)\castle-$(CastleWindsor)</CastleDirectory>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(OpenRastaDirectory)' == '' And '$(FrameworkProfile)' != ''">
+ <OpenRastaDirectory>$(RootPath)\bin\Release\net-$(FrameworkProfile)</OpenRastaDirectory>
+ </PropertyGroup>
+ <Import Project="$(RootPath)\build\defaults.targets" />
+
+
+ <ItemGroup Condition="'$(CastleWindsor)' != ''">
+ <Reference Include="Castle.Core">
+ <HintPath>$(CastleDirectory)\Castle.Core.dll</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ <Reference Include="Castle.MicroKernel">
+ <HintPath>$(CastleDirectory)\Castle.MicroKernel.dll</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ <Reference Include="Castle.Windsor">
+ <HintPath>$(CastleDirectory)\Castle.Windsor.dll</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <OpenRastaAssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta)' != ''">$(OpenRastaDirectory)\OpenRasta.dll</OpenRastaAssemblyPath>
+ <OpenRasta-Hosting-AspNet-AssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta-AspNet)' != ''">$(OpenRastaDirectory)\OpenRasta.Hosting.AspNet.dll</OpenRasta-Hosting-AspNet-AssemblyPath>
+ <OpenRasta-Codecs-WebForms-AssemblyPath Condition="'$(OpenRastaDirectory)' != '' And '$(OpenRasta-AspNet)' != ''">$(OpenRastaDirectory)\OpenRasta.Codecs.WebForms.dll</OpenRasta-Codecs-WebForms-AssemblyPath>
+ <OpenRasta-DI-WindsorAssemblyPath Condition="'$(OpenRasta-DI-Windsor)' != '' and '$(CastleWindsor)' == '1.0.3' ">$(OpenRastaDirectory)\OpenRasta.DI.Windsor-1.0.rc3.dll</OpenRasta-DI-WindsorAssemblyPath>
+ <OpenRasta-DI-WindsorAssemblyPath Condition="'$(OpenRasta-DI-Windsor)' != '' and '$(CastleWindsor)' == '1.1.b1007' ">$(OpenRastaDirectory)\OpenRasta.DI.Windsor.dll</OpenRasta-DI-WindsorAssemblyPath>
+
+</PropertyGroup>
+
+ <!--
+ OpenRasta Core Library
+ -->
+ <ItemGroup Condition="'$(OpenRastaAssemblyPath)' != ''">
+ <Reference Include="OpenRasta">
+ <HintPath>$(OpenRastaAssemblyPath)</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ <Reference Condition="'$(FrameworkProfile)' == '35'" Include="System.Core" />
+ </ItemGroup>
+
+ <!--
+ Asp.net module
+ -->
+ <ItemGroup Condition="'$(OpenRasta-AspNet)' != '' and '$(OpenRasta-Hosting-AspNet-AssemblyPath)' != ''">
+ <Reference Include="OpenRasta.Hosting.AspNet">
+ <HintPath>$(OpenRasta-Hosting-AspNet-AssemblyPath)</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ <Reference Include="OpenRasta.Codecs.WebForms" Condition="'$(OpenRasta-AspNet)' != ''">
+ <HintPath>$(OpenRasta-Codecs-WebForms-AssemblyPath)</HintPath>
+ <SpecificVersion>false</SpecificVersion>
+ </Reference>
+ </ItemGroup>
+
+ <!--
+ OpenRasta Windsor support
+ -->
+ <ItemGroup Condition="'$(OpenRasta-DI-WindsorAssemblyPath)' != ''">
+ <Reference Include="OpenRasta.DI.Windsor">
+ <HintPath>$(OpenRasta-DI-WindsorAssemblyPath)</HintPath>
+ </Reference>
+ </ItemGroup>
+
+
+
+
+ <Target Name="VerifyDependencies">
+ <Error Condition="'$(OpenRasta-DI-Windsor)' != '' and '$(CastleWindsor)' == ''" Text="If you add Windsor as a dependency, you need to specify which version with the CastleWindsor property." />
+ <MSBuild Projects="$(RootPath)\build\core.proj"
+ Condition="'$(OpenRasta)' != '' and !Exists('$(OpenRastaAssemblyPath)'))"
+ Properties="FrameworkProfileVersion=$(FrameworkProfile)" />
+ <MSBuild Projects="$(RootPath)\build\castle.proj"
+ Condition="'$(OpenRasta-DI-WindsorAssemblyPath)' != '' and !Exists('$(OpenRasta-DI-WindsorAssemblyPath)'))"
+ Properties="FrameworkProfileVersion=$(FrameworkProfile)" />
+ </Target>
+
+
+
+ <Target Name="BeforeBuild" DependsOnTargets="VerifyDependencies">
+ <Message Importance="high" Text="$(CastleDirectory)" />
+ <Message Importance="high" Text="@(Reference)" />
+ <!--<MSBuild Condition="!Exists('$(OpenRastaDirectory)\OpenRasta.dll')" Projects="..\..\..\Build\core.proj" Properties="FrameworkProfile=$(FrameworkProfile)" />-->
+ </Target>
+</Project>
12 build/deploy/ohloh.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package name="OpenRasta 2.0">
+ <releases>
+ <release name="2.0 Daily build">
+ <files>
+ <file name="OpenRasta-2.0.0.exe" />
+ </files>
+ </release>
+ </releases>
+ </package>
+</packages>
55 build/deploy/ohloh.xsd
@@ -0,0 +1,55 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:schemas-ohloh:instructfule">
+ <xsd:annotation>
+ <xsd:documentation xml:lang="en">
+ Download Instruction XML Format for Ohloh.new
+ Copyright 2008 Ohloh.net. All rights reserved.
+ </xsd:documentation>
+ </xsd:annotation>
+
+
+
+
+
+ <xsd:complexType name="FileType">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="date" type="xsd:dateTime"/>
+ <xsd:attribute name="platform" type="xsd:string"/>
+ <xsd:attribute name="icon" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="ReleaseType">
+ <xsd:all>
+ <xsd:element name="notes" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="files" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="file" type="FileType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:all>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="date" type="xsd:dateTime"/>
+ </xsd:complexType>
+ <xsd:complexType name="ReleasesType">
+ <xsd:sequence>
+ <xsd:element name="release" minOccurs="0" maxOccurs="unbounded" type="ReleaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PackageType">
+ <xsd:all>
+ <xsd:element name="description" minOccurs="0" maxOccurs="1" type="xsd:string"/>
+ <xsd:element name="releases" minOccurs="0" maxOccurs="1" type="ReleasesType"/>
+ </xsd:all>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="deprecated" type="xsd:boolean"/>
+ </xsd:complexType>
+ <xsd:complexType name="PackagesType">
+ <xsd:sequence>
+ <xsd:element name="package" minOccurs="0" maxOccurs="unbounded" type="PackageType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="packages" type="PackagesType"/>
+
+</xsd:schema>
+
0  build/keys/caff/empty.txt
No changes.
BIN  build/keys/debug.snk
Binary file not shown
223 build/module.targets
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Clean;Package" ToolsVersion="3.5">
+ <UsingTask TaskName="Microsoft.Build.Tasks.CreateItem" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+ <UsingTask TaskName="Microsoft.Build.Tasks.FindInList" AssemblyName="Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+
+ <PropertyGroup>
+ <RunTests Condition="'$(RunTests)' == ''">true</RunTests>
+ </PropertyGroup>
+
+ <!-- Framework versions for which the core can be built -->
+ <PropertyGroup>
+ <FrameworkProfile Condition="'$(FrameworkProfile)' == ''">35</FrameworkProfile>
+ <TargetFrameworkVersion Condition="'$(FrameworkProfile)'=='35'">v3.5</TargetFrameworkVersion>
+ <TargetFrameworkVersion Condition="'$(FrameworkProfile)'=='30'">v3.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion Condition="'$(FrameworkProfile)'=='20'">v2.0</TargetFrameworkVersion>
+ </PropertyGroup>
+
+ <ItemDefinitionGroup>
+ <Projects>
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ <UnitTest>false</UnitTest>
+ <NUnit-DisableShadowCopy>false</NUnit-DisableShadowCopy>
+ <SignAssembly>false</SignAssembly>
+ </Projects>
+ </ItemDefinitionGroup>
+
+ <PropertyGroup>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <MergedAssemblyName>OpenRasta.dll</MergedAssemblyName>
+ <CaffeineSignature>$(RootPath)\build\keys\caff\caff.snk</CaffeineSignature>
+
+ </PropertyGroup>
+
+
+ <!-- Default locations -->
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..</RootPath>
+ <SourcePath>$(RootPath)\src\$(MSBuildProjectName)</SourcePath>
+ <TempPath>$(RootPath)\bin\tmp\$(Configuration)\net-$(FrameworkProfile)</TempPath>
+ <OutputPath>$(RootPath)\bin\$(Configuration)\net-$(FrameworkProfile)</OutputPath>
+ <AssemblyOriginatorKeyFile Condition="!Exists('$(CaffeineSignature)')">$(RootPath)\build\keys\debug.snk</AssemblyOriginatorKeyFile>
+ <AssemblyOriginatorKeyFile Condition="Exists('$(CaffeineSignature)')">$(CaffeineSignature)</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+
+
+
+
+
+
+ <!--Tools locations-->
+ <Import Project="$(RootPath)\build\common.properties"/>
+
+
+
+
+
+
+
+ <Target Name="Clean">
+ <Delete ContinueOnError="true" Files="$(TempPath)\**" />
+ <RemoveDir Directories="$(TempPath)" ContinueOnError="true" />
+ </Target>
+
+
+
+ <Target Name="Verify">
+ <Error Condition="!Exists('$(ILMergePath)')" Text="IlMerge has not been found. Either install it from http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=22914587-b4ad-4eae-87cf-b14ae6a939b0&amp;displaylang=en or specify the path to Ilmerge.exe as the ILMergePath property."/>
+
+ <MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')"/>
+ <MakeDir Directories="$(NUnitReportsDirectory)" Condition="!Exists('$(NUnitReportsDirectory)')"/>
+
+ <MakeDir Directories="$(NUnitDirectory)/addins" Condition="!Exists('$(NUnitDirectory)/addins')" />
+
+
+ <ItemGroup>
+ <NUnitAddinFiles Include="$(teamcity_dotnet_nunitaddin)-2.5.*" />
+ </ItemGroup>
+ <Copy SourceFiles="@(NUnitAddinFiles)" DestinationFolder="$(NUnitDirectory)/addins" />
+
+ </Target>
+
+
+
+
+
+
+
+
+
+ <Target Name="GetProjectsForCurrentVersion">
+ <Microsoft.Build.Tasks.CreateItem Include="@(Projects)" Condition="%(MinVersion) &lt;= $(FrameworkProfile)" PreserveExistingMetadata="true">
+ <Output TaskParameter="Include" ItemName="VersionSpecificProject" />
+ </Microsoft.Build.Tasks.CreateItem>
+ </Target>
+
+
+
+
+
+
+
+
+
+
+ <Target Name="BuildMerged" DependsOnTargets="Verify;GetProjectsForCurrentVersion">
+ <MSBuild Projects="@(VersionSpecificProject)"
+ Targets="Rebuild"
+ Properties="OutputPath=$(TempPath)\%(Filename);TargetFrameworkVersion=$(TargetFrameworkVersion);Configuration=$(Configuration);RootPath=$(RootPath);SignAssembly=%(SignAssembly)"
+ Condition="'%(Merged)' == 'true'">
+ <Output ItemName="MergedAssemblies" TaskParameter="TargetOutputs"/>
+ </MSBuild>
+ </Target>
+
+
+
+
+
+
+
+
+
+
+
+
+ <Target Name="Merge" DependsOnTargets="BuildMerged" Inputs="@(MergedAssemblies)" Outputs="$(OutputPath)\$(MergedAssemblyName)">
+
+ <Exec Command="&quot;$(ILMergePath)&quot; /xmldocs /keyfile:&quot;$(AssemblyOriginatorKeyFile)&quot; /out:&quot;$(OutputPath)\$(MergedAssemblyName)&quot; @(MergedAssemblies ->'&quot;%(FullPath)&quot;', ' ')"/>
+
+ <ConvertToAbsolutePath Paths="$(OutputPath)\$(MergedAssemblyName)">
+ <Output ItemName="MergedAssembly" TaskParameter="AbsolutePaths" />
+ </ConvertToAbsolutePath>
+
+ <PropertyGroup>
+ <MergedAssemblyFullPath>@(MergedAssembly->'%(FullPath)')</MergedAssemblyFullPath>
+ </PropertyGroup>
+
+ <Message Importance="high" Text="Merged assembly at $(MergedAssemblyFullPath)" />
+ </Target>
+
+
+
+
+
+
+
+
+
+
+
+
+ <Target Name="BuildNonMerged" DependsOnTargets="GetProjectsForCurrentVersion;Merge">
+ <Message Importance="normal" Text="Building %(GetProjectsForCurrentVersion.Filename)" Condition="'%(Merged)'=='false'" />
+ <MSBuild Projects="@(VersionSpecificProject)"
+ Targets="Rebuild"
+ Properties="OutputPath=$(TempPath)\%(Filename);TargetFrameworkVersion=$(TargetFrameworkVersion);Configuration=$(Configuration);MergedAssemblyName=$(MergedAssemblyFullPath);RootPath=$(RootPath);SignAssembly=%(SignAssembly)"
+ Condition="'%(Merged)' == 'false'">
+ <Output ItemName="NonMergedAssemblies" TaskParameter="TargetOutputs"/>
+ </MSBuild>
+ <ItemGroup>
+ <AdditionalOutput Include="$(TempPath)\%(GetProjectsForCurrentVersion.AdditionalOutput)" Condition="'%(GetProjectsForCurrentVersion.AdditionalOutput)' != ''" />
+ </ItemGroup>
+ <Message Importance="high" Text="AdditionalOutput: %(GetProjectsForCurrentVersion.AdditionalOutput)" />
+ <Copy SourceFiles="@(NonMergedAssemblies)" DestinationFolder="$(OutputPath)" />
+ <Copy SourceFiles="@(NonMergedAssemblies->'%(RootDir)\%(Directory)\%(Filename).pdb')" DestinationFolder="$(OutputPath)" ContinueOnError="true" Condition="'@(NonMergedAssemblies->'%(RootDir)\%(Directory)\%(Filename).pdb')' != ''" />
+ <Copy SourceFiles="@(NonMergedAssemblies->'%(RootDir)\%(Directory)\%(Filename).xml')" DestinationFolder="$(OutputPath)" ContinueOnError="true" Condition="'@(NonMergedAssemblies->'%(RootDir)\%(Directory)\%(Filename).xml')' != ''" />
+
+ <Copy SourceFiles="@(AdditionalOutput)" DestinationFolder="$(OutputPath)" Condition="'@(AdditionalOutput)' != ''" />
+ </Target>
+
+
+
+
+
+
+
+
+ <Target Name="Build" DependsOnTargets="BuildMerged;BuildNonMerged"/>
+
+
+
+
+
+
+ <Target Name="Test" DependsOnTargets="Build" Inputs="@(NonMergedAssemblies)" Outputs="$(NUnitReportsDirectory)\%(NonMergedAssemblies.Filename).xml" Condition="'$(RunTests)' == 'true'">
+
+ <Microsoft.Build.Tasks.FindInList
+ List="@(VersionSpecificProject)"
+ ItemSpecToFind="%(NonMergedAssemblies.MSBuildSourceProjectFile)">
+ <Output TaskParameter="ItemFound" ItemName="OriginalProject" />
+ </Microsoft.Build.Tasks.FindInList>
+ <PropertyGroup>
+ <NUnit-DisableShadowCopy>%(OriginalProject.NUnit-DisableShadowCopy)</NUnit-DisableShadowCopy>
+ <NUnit-DisableShadowCopy Condition="'$(NUnit-DisableShadowCopy)' == ''">false</NUnit-DisableShadowCopy>
+ <UnitTest>%(OriginalProject.UnitTest)</UnitTest>
+ </PropertyGroup>
+
+ <NUnit ToolPath="$(NUnitDirectory)" Assemblies="@(NonMergedAssemblies)" OutputXmlFile="$(NUnitReportsDirectory)\%(UnitTestAssembly.Filename).xml" Condition="'$(UnitTest)' == 'true'" DisableShadowCopy="$(NUnit-DisableShadowCopy)" />
+ </Target>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <Target Name="Package" DependsOnTargets="Merge;BuildNonMerged;Test">
+ </Target>
+
+
+
+
+
+ <Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
+</Project>
18 build/ninject.proj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Ninject\OpenRasta.DI.Ninject.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Ninject.Tests.Unit\OpenRasta.DI.Ninject.Tests.Unit.csproj">
+ <UnitTest>true</UnitTest>
+ </Projects>
+
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Ninject\OpenRasta.DI.Ninject.csproj"/>
+ <Projects Include="$(SourcePath)\OpenRasta.DI.Ninject.Tests.Unit\OpenRasta.DI.Ninject.Tests.Unit.csproj">
+ <UnitTest>true</UnitTest>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
27 build/openbastard.proj
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenBastard\OpenBastard.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenBastard.Hosting.Iis7\OpenBastard.Hosting.Iis7.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenBastard.Hosting.Iis7.WorkerProcess-32\OpenBastard.Hosting.Iis7.WorkerProcess-32.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenBastard.Hosting.Iis7.WorkerProcess-64\OpenBastard.Hosting.Iis7.WorkerProcess-64.csproj">
+ <MinVersion>20</MinVersion>
+ <Merged>false</Merged>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenBastard.TestRunner\OpenBastard.TestRunner.csproj">
+ <MinVersion>20</MinVersion>
+ <UnitTest>true</UnitTest>
+ <NUnit-DisableShadowCopy>true</NUnit-DisableShadowCopy>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
203 build/releasebuilder.targets
@@ -0,0 +1,203 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+
+<!-- Build setup -->
+ <PropertyGroup>
+ <RunTests Condition="'$(RunTests)' == ''">true</RunTests>
+ </PropertyGroup>
+ <!--
+
+ Build version definitions
+
+
+ Builds are formatted as such
+
+ {BuildVersionMajor}.{BuildVersionMinor}.{BuildVersionBuild}.{BuildVersionRevision}
+
+ Major and minor are self explanatory.
+
+ BuildVersionPrefix
+ ==================
+
+ The build version build is calculated by adding the prefix defined as a property $(build_version_prefix) and the build counter teamcity reports $(BUILD_NUMBER)
+
+ -->
+
+ <PropertyGroup>
+ <BuildVersionMajor>$(DefaultBuildVersionMajor)</BuildVersionMajor>
+ <BuildVersionMinor>$(DefaultBuildVersionMinor)</BuildVersionMinor>
+
+ <BuildVersionRevision Condition="'$(BuildVersionRevision)' == '' and '$(build_version_revision)' != ''">$(build_version_revision)</BuildVersionRevision>
+ <BuildVersionRevision Condition="'$(BuildVersionRevision)' == ''">$(DefaultBuildVersionRevision)</BuildVersionRevision>
+
+ <BuildVersionBuildPrefix>$(build_version_prefix)</BuildVersionBuildPrefix>
+ <BuildVersionBuildPrefix Condition="'$(BuildVersionBuildPrefix)' == ''">0</BuildVersionBuildPrefix>
+
+ <Configuration Condition="'$(Configuration)'==''">Release</Configuration>
+
+ <PackageName Condition="'$(PackageName)' == ''">OpenRasta UNKNOWN</PackageName>
+ </PropertyGroup>
+
+
+ <!--
+
+ Common tools and releases paths
+
+ -->
+
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..</RootPath>
+ <SecurePath>$(RootPath)\build\keys\caff</SecurePath>
+ <OhlohRsaKey Condition="'$(OhlohRsaKey)' == ''">$(SecurePath)\caff.ppk</OhlohRsaKey>
+ <AuthenticodeKey Condition="'$(AuthenticodeKey)' == ''">$(SecurePath)\caff.pfx</AuthenticodeKey>
+ <SecureBuild Condition="'$(SecureBuild)' == '' and Exists('$(OhlohRsaKey)')">true</SecureBuild>
+ <DeployDir>$(RootPath)\build\deploy</DeployDir>
+ <CommonInfoPath>$(RootPath)\src\CommonInfo.cs</CommonInfoPath>
+ <TimeStampUrl>http://timestamp.verisign.com/scripts/timstamp.dll</TimeStampUrl>
+ </PropertyGroup>
+ <Import Project="$(RootPath)\build\common.properties"/>
+
+ <!--
+
+ Assembly info rewriter
+
+ -->
+
+ <Target Name="SetVersionInfo">
+ <Message Text="$(build_version_prefix) - $(BUILD_NUMBER)" />
+
+ <PropertyGroup>
+ <BuildVersionBuild Condition="
+ '$(BuildVersionBuild)' == ''
+ and
+ (
+ '$(BUILD_NUMBER)' == ''
+ or
+ '$(build_version_prefix)' == ''
+ )
+ ">$(DefaultBuildVersionBuild)</BuildVersionBuild>
+ </PropertyGroup>
+ <Math.Add Condition="'$(BuildVersionBuild)' == ''" Numbers="$(build_version_prefix);$(BUILD_NUMBER)">
+ <Output TaskParameter="Result" PropertyName="BuildVersionBuild" />
+ </Math.Add>
+ <PropertyGroup>
+ <BuildVersion>$(BuildVersionMajor).$(BuildVersionMinor).$(BuildVersionBuild).$(BuildVersionRevision)</BuildVersion>
+ <SetupFilePath Condition="'$(SetupFilePath)' == ''">$(RootPath)\bin\Release\OpenRasta-$(BuildVersion).exe</SetupFilePath>
+ </PropertyGroup>
+ <AssemblyInfo CodeLanguage="CS"
+ OutputFile="$(CommonInfoPath)"
+ AssemblyVersion="$(BuildVersion)"
+ AssemblyFileVersion="$(BuildVersion)"
+ AssemblyConfiguration=""
+ AssemblyCompany="Caffeine IT- naughtyProd Limited "
+ AssemblyProduct="$(PackageName) $(BuildVersionMajor).$(BuildVersionMinor) $(ReleaseName)"
+ AssemblyCopyright="Copyright (c) Caffeine IT - naughtyProd Limited - Sebastien Lambla "
+ AssemblyTrademark=""
+ ComVisible="false"
+ CLSCompliant="false" />
+ <Message Importance="high" Text="##teamcity[buildNumber '$(BuildVersion)']" />
+ <Message Importance="normal" Text="Setting version for prefix $(BuildVersionBuildPrefix) to $(BuildVersion)" />
+ </Target>
+
+ <Target Name="CleanAll">
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=20" Targets="Clean" />
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=30" Targets="Clean" />
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=35" Targets="Clean" />
+ </Target>
+ <!--
+
+ Version-specific builds
+
+ -->
+
+ <Target Name="Build-20" DependsOnTargets="SetVersionInfo">
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=20;Configuration=$(Configuration);RunTests=$(RunTests)" BuildInParallel="true">
+ <Output TaskParameter="TargetOutputs" ItemName="BuildResult20"/>
+ </MSBuild>
+ </Target>
+ <Target Name="Build-30" DependsOnTargets="SetVersionInfo">
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=30;Configuration=$(Configuration);RunTests=$(RunTests)" BuildInParallel="true">
+ <Output TaskParameter="TargetOutputs" ItemName="BuildResult30"/>
+ </MSBuild>
+ </Target>
+ <Target Name="Build-35" DependsOnTargets="SetVersionInfo">
+ <MSBuild Projects="@(Module)" Properties="FrameworkProfile=35;Configuration=$(Configuration);RunTests=$(RunTests)" BuildInParallel="true">
+ <Output TaskParameter="TargetOutputs" ItemName="BuildResult35"/>
+ </MSBuild>
+ </Target>
+ <Target Name="BuildAll" DependsOnTargets="Build-20;Build-30;Build-35">
+ <Message Importance="high" Text="##teamcity[buildNumber '$(BuildVersion)']"/>
+ </Target>
+
+
+
+ <!--
+
+ Installer builder
+
+ -->
+ <Target Name="CompileInstaller" DependsOnTargets="BuildAll" >
+ <MSBuild Projects="@(Installer)" Targets="Rebuild" Properties="Platform=x86;Configuration=Release;WixToolPath=$(WixToolPath);WixTargetsPath=$(WixTargetsPath);WixTasksPath=$(WixTasksPath);WinExtDir=$(WinExtDir);BuildVersionMajor=$(BuildVersionMajor);BuildVersionMinor=$(BuildVersionMinor);BuildVersionBuild=$(BuildVersionBuild);BuildVersionRevision=$(BuildVersionRevision);BuildVersionBuildPrefix=$(BuildVersionBuildPrefix);PackageName=$(PackageName);ReleaseName=$(ReleaseName)">
+ <Output TaskParameter="TargetOutputs" ItemName="MSIFile" />
+ </MSBuild>
+ <Exec Condition="'$(SecureBuild)' == 'true'" Command="signtool.exe sign /f $(AuthenticodeKey) /p &quot;$(authenticode_key_password)&quot; /t $(TimeStampUrl) @(MSIFile)" />
+ <Exec Command="$(WixToolPath)\setupbld.exe -out $(SetupFilePath) -mcsu @(MSIFile) -setup $(WixToolPath)\setup.exe" />
+
+ <Exec Condition="'$(SecureBuild)' == 'true'" Command="signtool.exe sign /f $(AuthenticodeKey) /p &quot;$(authenticode_key_password)&quot; /t $(TimeStampUrl) $(SetupFilePath)" />
+ <Message Importance="high" Text="##teamcity[publishArtifacts '$(SetupFilePath)']" />
+ </Target>
+
+
+
+ <!--
+
+ Ohloh upload
+
+ -->
+
+ <Target Name="BuildInstructFile">
+ <ItemGroup>
+ <FileToUpload Include="$(SetupFilePath)" />
+ <InstructFile Include="$(DeployDir)\ohloh.xml" />
+ </ItemGroup>
+ <XmlUpdate Namespace=""
+ XmlFileName="@(InstructFile)"
+ XPath="/packages/package/@name"
+ Value="$(PackageName) $(BuildVersionMajor).$(BuildVersionMinor)" />
+ <XmlUpdate Namespace=""
+ XmlFileName="@(InstructFile)"
+ XPath="/packages/package/releases/release/@name"
+ Value="$(ReleaseName)" />
+ <XmlUpdate Namespace=""
+ XmlFileName="@(InstructFile)"
+ XPath="/packages/package/releases/release/files/file/@name"
+ Value="@(FileToUpload->'%(FileName)%(Extension)')" />
+ </Target>
+ <Target Name="UploadToOhloh" Condition="'$(SecureBuild)' == 'true'" DependsOnTargets="CompileInstaller;BuildInstructFile">
+ <Message Importance="high" Text="##teamcity[progressMessage 'Sending release to ohloh.net']" />
+ <WriteLinesToFile Overwrite="true" File="$(DeployDir)\sftp.batch" Lines="cd openrasta/files" />
+ <WriteLinesToFile Overwrite="false" File="$(DeployDir)\sftp.batch" Lines="@(FileToUpload -> 'put %(FullPath)')" />
+ <WriteLinesToFile Overwrite="false" File="$(DeployDir)\sftp.batch" Lines="cd ../instructs" />
+ <WriteLinesToFile Overwrite="false" File="$(DeployDir)\sftp.batch" Lines="@(InstructFile -> 'put %(FullPath)')" />
+ <WriteLinesToFile Overwrite="false" File="$(DeployDir)\sftp.batch" Lines="quit" />
+ <Message Importance="normal" Text="Using Command Line: $(SftpPath) -batch -i '$(OhlohRsaKey)' -b '$(DeployDir)\sftp.batch' -bc serialseb@upload.ohloh.net" />
+ <Error Condition="!Exists('$(SftpPath)')" Text="Couldnt find sftp.exe. Try redefining the SftpPath property." />
+ <Exec Command="&quot;$(SftpPath)&quot; -batch -i &quot;$(OhlohRsaKey)&quot; -b &quot;$(DeployDir)\sftp.batch&quot; -bc serialseb@upload.ohloh.net" />
+
+ <!-- Add the version to TRAC -->
+ <CallTarget Targets="PublishTracVersion" Condition="'$(trac_username)' != '' and '$(trac_password)' != ''"/>
+
+ </Target>
+ <Target Name="PublishTracVersion">
+ <Message Importance="high" Text="##teamcity[progressStart 'Publishing new version to TRAC']" />
+ <Message Importance="normal" Text="Publishing version '$(ReleaseName) - $(BuildVersion)'" />
+ <TracVersion
+ Name="$(ReleaseName) - $(BuildVersion)"
+ Action="Add"
+ Uri="http://trac.caffeine-it.com/openrasta/login/xmlrpc"
+ Username="$(trac_username)"
+ Password="$(trac_password)" />
+ </Target>
+
+ <Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
+ <Import Project="$(RootPath)\lib\trac-0.1\CaffeineIT.MSBuild.Trac.tasks"/>
+</Project>
16 build/sharpview.proj
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <ItemGroup>
+ <Projects Include="$(SourcePath)\OpenRasta.Codecs.SharpView\OpenRasta.Codecs.SharpView.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ <SignAssembly>true</SignAssembly>
+ </Projects>
+ <Projects Include="$(SourcePath)\OpenRasta.Codecs.SharpView.Tests.Unit\OpenRasta.Codecs.SharpView.Tests.Unit.csproj">
+ <MinVersion>35</MinVersion>
+ <Merged>false</Merged>
+ <UnitTest>true</UnitTest>
+ </Projects>
+ </ItemGroup>
+ <Import Project="module.targets" />
+</Project>
35 build/vside.proj
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Package">
+ <PropertyGroup>
+ <RootPath Condition="'$(RootPath)' == ''">$(MSBuildProjectDirectory)\..</RootPath>
+ <OutputPath>$(RootPath)\bin\$(Configuration)\vside</OutputPath>
+ <VSTemplatesPath>$(RootPath)\src\vside\templates</VSTemplatesPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectTemplate Include="$(VSTemplatesPath)\aspnet35\**\*" Exclude="$(VSTemplatesPath)\**\.svn\**">
+ <Package>aspnet35.zip</Package>
+ <WorkingDirectory>$(RootPath)\src\vside\templates\aspnet35</WorkingDirectory>
+ </ProjectTemplate>
+ <ProjectTemplate Include="$(RootPath)\src\vside\templates\aspnet35-item-contentview\**\*" Exclude="$(VSTemplatesPath)\**\.svn\**">
+ <Package>aspnet35-item-contentview.zip</Package>
+ <WorkingDirectory>$(RootPath)\src\vside\templates\aspnet35-item-contentview</WorkingDirectory>
+ </ProjectTemplate>
+ <ProjectTemplate Include="$(RootPath)\src\vside\templates\aspnet35-item-masterpage\**\*" Exclude="$(VSTemplatesPath)\**\.svn\**">
+ <Package>aspnet35-item-masterpage.zip</Package>
+ <WorkingDirectory>$(RootPath)\src\vside\templates\aspnet35-item-masterpage</WorkingDirectory>
+ </ProjectTemplate>
+ <ProjectTemplate Include="$(RootPath)\src\vside\templates\aspnet35-item-view\**\*" Exclude="$(VSTemplatesPath)\**\.svn\**">
+ <Package>aspnet35-item-view.zip</Package>
+ <WorkingDirectory>$(RootPath)\src\vside\templates\aspnet35-item-view</WorkingDirectory>
+ </ProjectTemplate>
+ </ItemGroup>
+ <Target Name="Verify">
+ <MakeDir Directories="$(OutputPath)" Condition="!Exists('$()OutputPath)')" />
+ </Target>
+ <Target Name="Package" DependsOnTargets="Verify">
+ <Zip Files="@(ProjectTemplate)" WorkingDirectory="%(WorkingDirectory)" ZipFileName="$(OutputPath)\%(Package)" />
+ </Target>
+ <Import Project="common.properties" />
+ <Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
+</Project>
13 doc/content/Fundamentals/Dependencies/DependenciesOverview.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<title>Untitled 0</title>
+</head>
+
+<body>
+
+</body>
+
+</html>
58 doc/content/Fundamentals/Handlers/HandlersOverview.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="en-gb" http-equiv="Content-Language" />
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<title>Handlers Overview</title>
+</head>
+
+<body>
+
+<h1>Handlers overview</h1>
+<p>Whenever any request is processed by an OpenRasta application, the URI is
+associated with a resource type, for which a compatible handler will be
+selected.</p>
+<p>Handlers do not need to inherit from any base class. A valid handler always
+gets instantiated through a dependency resolver, be it the OpenRasta internal
+one or any IoC you have configured yourself. As such, any class can be
+instantiated, as long as their dependencies can also be resolved. For more
+information, see the <a href="../Dependencies/DependenciesOverview.html">
+dependency management topic</a>.</p>
+<h2>Method resolution</h2>
+<p>Once the handler is instantiated, OpenRasta enumerates all its the public
+methods and select the method matching the HTTP method that the client
+requested.</p>
+<p>For example, when accessing a resource, a user agent such as a browser may
+issue a GET /product. The name matching being case-insensitive, the following
+handler will see its Get() method selected.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">ProductHandler</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ OperationResult</span> Get() { <span style="color: #a6a0e0;">...</span> }
+ </p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+</div>
+<!--EndFragment-->
+<p>Alternatively, a method can be attributed to override the name matching. In
+the next example, the GetProduct method will be selected.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [<span style="color: #00d2d2;">HttpOperation</span>(<span style="color: #00d2d2;">HttpMethod</span><span style="color: #a6a0e0;">.</span>GET)]</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ OperationResult</span> GetProduct() { <span style="color: #a6a0e0;">...</span>
+ } </p>
+</div>
+<!--EndFragment-->
+<p>OpenRasta doesn&#39;t care much which http method you implement, and as such
+supports any existing and future methods.</p>
+<p>Once a list of potential methods has been selected, OpenRasta analyses the
+list of parameters </p>
+
+</body>
+
+</html>
13 doc/content/Fundamentals/Handlers/ParametersParsing.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" x-undefined="" />
+<title>Untitled 1</title>
+</head>
+
+<body>
+
+</body>
+
+</html>
394 doc/content/Tutorials/Create-First-Site.html
@@ -0,0 +1,394 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="en-gb" http-equiv="Content-Language" />
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<title>Creating an OpenRasta website</title>
+</head>
+
+<body>
+
+<h1>Creating an OpenRasta website</h1>
+<p>First, follow the instructions in <a href="Download.html">Downloading and
+compiling OpenRasta</a>. You should now have the compiled version of OpenRasta,
+ready for use.</p>
+<h2>Creating the project</h2>
+<p>Open Visual Studio 2008 and create a new Web Application project.</p>
+<p>
+<img alt="" longdesc="Create a new project" src="../img/Create-First-Site/img7.png" /></p>
+<p>Once the project is created, add a reference to the 3.5 version of
+OpenRasta.dll. It should be in \openrasta\bin\release\net-35\OpenRasta.dll.</p>
+<h2>Modifying web.config</h2>
+<p>Now, edit the web.config file to point to the OpenRasta http handlers and
+modules. They&#39;re the two components required for OpenRasta to serve requests
+made against your server.</p>
+<p>In the &lt;system.web&gt; section, in &lt;httpHandlers&gt;, add the following line.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;add </span><span style="color: #fa8072;">verb</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;*&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">path</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;*.rastahook&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">type</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRasta.Web.OpenRastaHandler,
+ OpenRasta&quot;</span><span style="color: #7ee0ce;">/&gt;</span></p>
+</div>
+<!--EndFragment-->
+<p>In &lt;httpModules&gt;, add the following.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;add </span><span style="color: #fa8072;">name</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRastaModule&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">type</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRasta.Web.OpenRastaModule,
+ OpenRasta&quot;</span><span style="color: #7ee0ce;">/&gt;</span></p>
+</div>
+<!--EndFragment-->
+<p>If you&#39;re using IIS7, the http handlers and modules need to be defined in the
+&lt;system.webServer&gt; section, as follow.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp; &lt;system.webServer&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;
+ &lt;validation </span><span style="color: #fa8072;">
+ validateIntegratedModeConfiguration</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;false&quot;</span><span style="color: #7ee0ce;">/&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;
+ &lt;modules&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;add </span><span style="color: #fa8072;">name</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRastaModule&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">type</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRasta.Web.OpenRastaModule,
+ OpenRasta&quot;</span><span style="color: #7ee0ce;">/&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;
+ &lt;/modules&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;
+ &lt;handlers&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ &lt;add </span><span style="color: #fa8072;">name</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRastaHandler&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">verb</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;*&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">path</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;*.rastahook&quot;</span><span style="color: #7ee0ce;">
+ </span><span style="color: #fa8072;">type</span><span style="color: #7ee0ce;">=</span><span style="color: #87df71;">&quot;OpenRasta.Web.OpenRastaHandler,
+ OpenRasta&quot;</span><span style="color: #7ee0ce;"> /&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp;&nbsp;&nbsp;
+ &lt;/handlers&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&nbsp; &lt;/system.webServer&gt;</span></p>
+</div>
+<!--EndFragment-->
+<h2>Removing the default page</h2>
+<p>The next step is to get rid of the content in the automatically generated
+default.aspx page. You need to keep that page at the root of the site, otherwise
+asp.net won&#39;t recognize OpenRasta. Simply remove all the content until your
+default.aspx looks like the following.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #fff977; background: #2a2a2a;">
+ &lt;%</span><span style="color: #7ee0ce;">@</span>
+ <span style="color: #63dac5;">Page</span> <span style="color: #fa8072;">
+ Language</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;C#&quot;</span>
+ <span style="color: #fa8072;">AutoEventWireup</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;true&quot;</span>
+ <span style="color: #fa8072;">CodeBehind</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;default.aspx.cs&quot;</span>
+ <span style="color: #fa8072;">Inherits</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;OpenRasta.Demo._default&quot;</span>
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #72d89d;">&lt;!-- Nothing to see
+ here. --&gt;</span></p>
+</div>
+<!--EndFragment-->
+<h2>Configuring OpenRasta</h2>
+<p>
+<img alt="A solution after the folder creation" src="../img/Create-First-Site/img11.png" style="float: right" />The
+first step in designing your web site is to define what resources you want to
+serve. One of the first resources you will need is a home page.</p>
+<p>First, create three folders at the root of your solution.</p>
+<ul>
+ <li>Handlers<br />
+ Handlers are the objects responsible to act upon resources through the http
+ uniform interface, and will always get called first. They&#39;re the equivalent
+ of Controllers in other frameworks.</li>
+ <li>Resources<br />
+ Your resources are what you expose on various Uris. In OpenRasta, each thing
+ you want to expose on the web needs to have a Resource class associated with
+ it.</li>
+ <li>Views<br />
+ Views are responsible for rendering what the handler returned. Often it will
+ be the resource that was requested.</li>
+</ul>
+<p>Then, create a class in the Resources folder, and call it Home, and add a few
+properties that will be needed for future rendering.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">namespace</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Resources</p>
+ <p style="margin: 0px;">{</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">Home</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00bfff;">
+ string</span> Title { <span style="color: #00bfff;">get</span>;
+ <span style="color: #00bfff;">set</span>; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">}</p>
+</div>
+<!--EndFragment-->
+<p>The next step is to create a handler that will generate the Home resource. Go
+ahead and create an empty HomeHandler class in the Handlers folder.</p>
+<p>All the elements are now in place to create the configuration. OpenRasta is
+configured through the use of a fluent API. You can either add the configuration
+to your global.asax, or create a specific class. Let&#39;s do the latter, and add a
+Configurator class at the root of the site, and implement the
+IConfigurationSource interface.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span> System;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span> OpenRasta<span style="color: #a6a0e0;">.</span>Configuration;</p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">namespace</span>
+ MyRestApplication</p>
+ <p style="margin: 0px;">{</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">Configurator</span> :
+ <span style="color: #92e4d6;">IConfigurationSource</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00bfff;">
+ void</span> Configure()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #bdb76b;">// the configuration goes here</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">}</p>
+</div>
+<!--EndFragment-->
+<p>The Configure method is where all your resources will be declared. Let&#39;s
+define the resource first, using a manual configuration. to do so, declare a <em>
+using</em> block and use the ResourceSpace static class to start your
+configuration.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">using</span> (<span style="color: #00d2d2;">OpenRastaConfiguration</span><span style="color: #a6a0e0;">.</span>Manual)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00d2d2;">ResourceSpace</span><span style="color: #a6a0e0;">.</span>Has<span style="color: #a6a0e0;">.</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ }</p>
+</div>
+<!--EndFragment-->
+<p>The Has word is the root of the configuration options. You&#39;ll find a few
+options in there, depending on which version of OpenRasta you&#39;re using, and any
+third-party code that may attach to this word to add their own configuration
+options.</p>
+<p>First, define the resource Home we created earlier by using the
+ResourcesOfType generic method. Attach the resource to the /home uri by using
+the AtUri method. Finally, define that the HomeHandler will be responsible for
+instantiating (a process called <em>dereferencing</em>) the Home resource. You
+should now have a configuration looking like the following.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00d2d2;">ResourceSpace</span><span style="color: #a6a0e0;">.</span>Has<span style="color: #a6a0e0;">.</span>ResourcesOfType<span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">Home</span><span style="color: #a6a0e0;">&gt;</span>()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>AtUri(<span style="color: #fa8072;">&quot;/home&quot;</span>)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>HandledBy<span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">HomeHandler</span><span style="color: #a6a0e0;">&gt;</span>();</p>
+</div>
+<!--EndFragment-->
+<h2>Http verbs and status codes</h2>
+<p>If you now try to run this website, you&#39;ll end up with an HTTP 405 error.</p>
+<p>
+<img alt="Internet Explorer returning a 405" height="174" src="../img/Create-First-Site/2008-12-07_1438.png" width="435" />&nbsp;</p>
+<p>OpenRasta leverages the status codes defined in HTTP. A 405 error means that
+the method used to access the URI is not allowed on the resource.</p>
+<p>Whenever you access any URI over HTTP, a method is used to define what action
+is to be executed against the resource. Here, the method GET was used to access
+/home, but OpenRasata didn&#39;t find any matching method. And indeed, your
+HomeHandler doesn&#39;t have any method defined!</p>
+<p>Let&#39;s create a Get method on the HomeHandler class, and return a new instance
+of the Home resource.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Resources;</p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">namespace</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Handlers</p>
+ <p style="margin: 0px;">{</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">HomeHandler</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00bfff;">
+ object</span> Get()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">return</span> <span style="color: #00bfff;">
+ new</span> <span style="color: #00d2d2;">Home</span> { Title
+ <span style="color: #a6a0e0;">=</span> <span style="color: #fa8072;">
+ &quot;Welcome home.&quot;</span> };</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">}</p>
+</div>
+<!--EndFragment-->
+<p>We simply return a new home instance from the handler. Let&#39;s try to run the
+page again.</p>
+<p>
+<img alt="Internet Explorer returning a 406" height="98" src="../img/Create-First-Site/2008-12-07_1437.png" width="380" />&nbsp;</p>
+<p>New error, at least we made some progress. 406 is the status code a server
+returns when it cannot find a compatible media type as requested by the browser.</p>
+<h2>Content negotiation and codecs</h2>
+<p>OpenRasta leverages content negotiation. Whenever your browser (or any other
+http client) sends a request, it can include an Accept header defining what
+formats it understands. Those usually include html and most of the plugin-supported
+types a browser can render. These types are called <strong>representations</strong>.</p>
+<p>In our configuration, we haven&#39;t specified specified yet what representations
+we support for our Home resource, and OpenRasta returns a 406 to let the client
+know that no compatible representation was found. To enable generating
+representations, OpenRasta uses codecs, objects that can turn the bytes sent
+over the wire into objects and back.</p>
+<p>Go go ahead and create a new aspx page in our Views folder, and call it
+HomeView.aspx. When you use an aspx page as a view in OpenRasta, you essentially
+create a template to generate content. As such, postbacks and events are not
+supported. So go ahead and remove the form tag. Your page should look something
+like the following.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #fff977; background: #2a2a2a;">
+ &lt;%</span><span style="color: #7ee0ce;">@</span>
+ <span style="color: #63dac5;">Page</span> <span style="color: #fa8072;">
+ Language</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;C#&quot;</span>
+ <span style="color: #fa8072;">AutoEventWireup</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;true&quot;</span>
+ <span style="color: #fa8072;">CodeBehind</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;HomeView.aspx.cs&quot;</span>
+ <span style="color: #fa8072;">Inherits</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;MyRestApplication.Views.HomeView&quot;</span>
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;!</span><span style="color: #63dac5;">DOCTYPE</span>
+ <span style="color: #fa8072;">html</span> <span style="color: #fa8072;">
+ PUBLIC</span> <span style="color: #87df71;">&quot;-//W3C//DTD XHTML 1.0
+ Transitional//EN&quot;</span> <span style="color: #87df71;">
+ &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">html</span>
+ <span style="color: #fa8072;">xmlns</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;http://www.w3.org/1999/xhtml&quot;</span>
+ <span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">head</span>
+ <span style="color: #fa8072;">runat</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;server&quot;</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">title</span><span style="color: #7ee0ce;">&gt;&lt;/</span><span style="color: #63dac5;">title</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">head</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">body</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Welcome
+ to my page!</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">body</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">html</span><span style="color: #7ee0ce;">&gt;</span></p>
+</div>
+<!--EndFragment-->
+<p>Finally, we&#39;re going to add this view to our configuration. Import the
+configuration elements for webforms by importing the
+OpenRasta.Configuration.WebForms namespace, and use the AndRenderedByAspx method
+to define your view. Your configuration should now be looking like this.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Handlers;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Resources;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span> OpenRasta<span style="color: #a6a0e0;">.</span>Configuration;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span> OpenRasta<span style="color: #a6a0e0;">.</span>Configuration<span style="color: #a6a0e0;">.</span>WebForms;</p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">namespace</span>
+ MyRestApplication</p>
+ <p style="margin: 0px;">{</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">Configurator</span> :
+ <span style="color: #92e4d6;">IConfigurationSource</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00bfff;">
+ void</span> Configure()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">using</span> (<span style="color: #00d2d2;">OpenRastaConfiguration</span><span style="color: #a6a0e0;">.</span>Manual)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00d2d2;">ResourceSpace</span><span style="color: #a6a0e0;">.</span>Has<span style="color: #a6a0e0;">.</span>ResourcesOfType<span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">Home</span><span style="color: #a6a0e0;">&gt;</span>()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>AtUri(<span style="color: #fa8072;">&quot;/home&quot;</span>)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>HandledBy<span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">HomeHandler</span><span style="color: #a6a0e0;">&gt;</span>()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>AndRendededByAspx(<span style="color: #fa8072;">&quot;~/Views/HomeView.aspx&quot;</span>);</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">}</p>
+</div>
+<!--EndFragment-->
+<p>If you now run that page, you&#39;ll notice that we have our content showing! But
+so far, we&#39;ve only rendered static text.</p>
+<h2>Presenting the resource</h2>
+<p>The handler created an instance of the Home type. It&#39;s now time to put it to
+good use. Edit the code-behind of your view to add a property of type Home.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span> System;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">using</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Resources;</p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #00bfff;">namespace</span>
+ MyRestApplication<span style="color: #a6a0e0;">.</span>Views</p>
+ <p style="margin: 0px;">{</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">partial</span>
+ <span style="color: #00bfff;">class</span> <span style="color: #00d2d2;">
+ HomeView</span> : System<span style="color: #a6a0e0;">.</span>Web<span style="color: #a6a0e0;">.</span>UI<span style="color: #a6a0e0;">.</span><span style="color: #00d2d2;">Page</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ Home</span> Home { <span style="color: #00bfff;">get</span>;
+ <span style="color: #00bfff;">set</span>; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
+ <p style="margin: 0px;">}</p>
+</div>
+<p>OpenRasta will associate that property automatically with the value returned
+by your handler.</p>
+<p>By leveraging the aspx syntax, you can now use the property we defined
+earlier. Compile the application for visual studio to pick-up our new property
+in intellisense, and modify the aspx page to render the title property in both
+the head title tag and the content.&nbsp;</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;"><span style="color: #fff977; background: #2a2a2a;">
+ &lt;%</span><span style="color: #7ee0ce;">@</span>
+ <span style="color: #63dac5;">Page</span> <span style="color: #fa8072;">
+ Language</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;C#&quot;</span>
+ <span style="color: #fa8072;">AutoEventWireup</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;true&quot;</span>
+ <span style="color: #fa8072;">CodeBehind</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;HomeView.aspx.cs&quot;</span>
+ <span style="color: #fa8072;">Inherits</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;MyRestApplication.Views.HomeView&quot;</span>
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;!</span><span style="color: #63dac5;">DOCTYPE</span>
+ <span style="color: #fa8072;">html</span> <span style="color: #fa8072;">
+ PUBLIC</span> <span style="color: #87df71;">&quot;-//W3C//DTD XHTML 1.0
+ Transitional//EN&quot;</span> <span style="color: #87df71;">
+ &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;</p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">html</span>
+ <span style="color: #fa8072;">xmlns</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;http://www.w3.org/1999/xhtml&quot;</span>
+ <span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">head</span>
+ <span style="color: #fa8072;">runat</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;server&quot;</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">title</span><span style="color: #7ee0ce;">&gt;</span><span style="color: #fff977; background: #2a2a2a;">&lt;%</span><span style="color: #d0d0d0;">=</span>
+ Home<span style="color: #a6a0e0;">.</span>Title
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">title</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">head</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">body</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #fff977; background: #2a2a2a;">&lt;%</span><span style="color: #d0d0d0;">=</span>
+ Home<span style="color: #a6a0e0;">.</span>Title
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">body</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;"><span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">html</span><span style="color: #7ee0ce;">&gt;</span></p>
+</div>
+<!--EndFragment-->
+<p style="margin: 0px">&nbsp;</p>
+<p>Run the page, and you should be greeted by our page, with the correct data
+being displayed.</p>
+
+</body>
+
+</html>
38 doc/content/Tutorials/Download.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="en-gb" http-equiv="Content-Language" />
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<title>Download and compile OpenRasta</title>
+<style type="text/css">
+.style1 {
+ text-align: left;
+}
+</style>
+</head>
+
+<body>
+
+<h1>Downloading and compiling OpenRasta</h1>
+<p>OpenRasta is only available in source-code form at the moment.</p>
+<p>For these instructions, you will need to install
+<a href="http://www.collab.net/downloads/subversion/">svn 1.5 or later</a> and
+<a href="http://www.microsoft.com/downloads/details.aspx?familyid=22914587-b4ad-4eae-87cf-b14ae6a939b0&amp;displaylang=en">
+ilmerge</a>. While OpenRasta runs on plain 2.0, it necessitate version 3.5 of
+the .net framework to compile, and Visual Studio 2008 for your development.</p>
+<p class="style1">To download OpenRasta, first do a checkout of the source code.
+Using the command line:</p>
+<pre>c:\src&gt; svn co http://svn.caffeine-it.com/openrasta/trunk openrasta</pre>
+<p>This will download the content of the trunk version in the folder c:\src\openrasta.
+Navigate to that folder, and build using the provided make.bat script.</p>
+<pre>c:\src\openrasta&gt; make.bat</pre>
+<p>This will have generated the OpenRasta dll you will need. All the binaries
+should now be in the openrasta\bin\release folder.</p>
+<p>Based on the version of .net installed on the server you want to deploy
+OpenRasta on, you can pick between .net 2.0, 3.0 and 3.5. Some functionality is
+specific to each version</p>
+
+</body>
+
+</html>
13 doc/content/Tutorials/ReturningHttpStatusCodes.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" x-undefined="" />
+<title>Untitled 1</title>
+</head>
+
+<body>
+
+</body>
+
+</html>
213 doc/content/Tutorials/UsingForms.html
@@ -0,0 +1,213 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="en-gb" http-equiv="Content-Language" />
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+<title>Untitled 0</title>
+<style type="text/css">
+.style1 {
+ text-align: center;
+}
+</style>
+</head>
+
+<body>
+
+<h1>Using forms</h1>
+<p>ReST means <em>representational state transfer</em>. As we&#39;ve seen in the
+previous tutorial, in OpenRasta representations are rendered using a codec.</p>
+<p>When using html forms, what you are
+effectively doing is sending a <strong>representation </strong>of
+your resource, using either application/x-www-urlform-encoded or
+multipart/form-data. The browser will take all the form inputs in the html page,
+create the representation and send a request to your application using the verb
+you specified in the method parameter of&nbsp; your form tag.</p>
+<p>OpenRasta provides strong support for handling such forms. To illustrate
+those requirements, let&#39;s create a new resource of type IList&lt;Product&gt;. You&#39;ll
+need to create the configuration, a handler called ProductListHandler and a
+resource of type Product. Refer to <a href="Create-First-Site.html">Creating an
+OpenRasta website</a> topic for a detailed overview.</p>
+<p>Your configuration should now contain the following section.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00d2d2;">ResourceSpace</span><span style="color: #a6a0e0;">.</span>Has<span style="color: #a6a0e0;">.</span>ResourcesOfType<span style="color: #a6a0e0;">&lt;</span><span style="color: #92e4d6;">IList</span><span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">Product</span><span style="color: #a6a0e0;">&gt;&gt;</span>()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>AtUri(<span style="color: #fa8072;">&quot;/products&quot;</span>)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>HandledBy<span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">ProductListHandler</span><span style="color: #a6a0e0;">&gt;</span>()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #a6a0e0;">.</span>AndRendededByAspx(<span style="color: #fa8072;">&quot;~/Views/ProductListView.aspx&quot;</span>);</p>
+</div>
+<!--EndFragment-->
+<p>For the purpose of this example, we&#39;ll simply store the list of products in a
+static member on the handler class. In real-world scenarios, you would use a
+storage back-end such as a database.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px; margin-left: auto; margin-right: auto;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #00bfff;">
+ public</span> <span style="color: #00bfff;">class</span>
+ <span style="color: #00d2d2;">ProductListHandler</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00bfff;">
+ static</span> <span style="color: #92e4d6;">IList</span><span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">Product</span><span style="color: #a6a0e0;">&gt;</span>
+ Products { <span style="color: #00bfff;">get</span>;
+ <span style="color: #00bfff;">private</span> <span style="color: #00bfff;">
+ set</span>; }</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> ProductListHandler()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ Products <span style="color: #a6a0e0;">=</span>
+ <span style="color: #00bfff;">new</span> <span style="color: #00d2d2;">List</span><span style="color: #a6a0e0;">&lt;</span><span style="color: #00d2d2;">Product</span><span style="color: #a6a0e0;">&gt;</span>
+ {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">new</span> <span style="color: #00d2d2;">
+ Product</span> { Name <span style="color: #a6a0e0;">=</span>
+ <span style="color: #fa8072;">&quot;MacBook Pro&quot;</span> },</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">new</span> <span style="color: #00d2d2;">
+ Product</span> { Name <span style="color: #a6a0e0;">=</span>
+ <span style="color: #fa8072;">&quot;MacBook Air&quot;</span> } </p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ };</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+</div>
+<!--EndFragment-->
+<p>We create the handler&#39;s get method to return the list of products.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ OperationResult</span> Get()</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">return</span> <span style="color: #00bfff;">
+ new</span> <span style="color: #00d2d2;">OperationResult</span><span style="color: #a6a0e0;">.</span><span style="color: #00d2d2;">OK</span>
+ { ResponseResource <span style="color: #a6a0e0;">=</span> Products };</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+</div>
+<!--EndFragment-->
+<p>Now let&#39;s generate the view. As previously, add a public property of type
+IList&lt;Product&gt; and name it Products. Add the following code to the template to
+render the products, as well as a form to add a new product.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">h1</span><span style="color: #7ee0ce;">&gt;</span>List
+ of products<span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">h1</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">ul</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #fff977; background: #2a2a2a;">&lt;%</span>
+ <span style="color: #00bfff;">foreach</span> (<span style="color: #00bfff;">var</span>
+ product <span style="color: #00bfff;">in</span> Products) {
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">li</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #fff977; background: #2a2a2a;">&lt;%</span><span style="color: #d0d0d0;">=</span>
+ product<span style="color: #a6a0e0;">.</span>Name
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">li</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #fff977; background: #2a2a2a;">&lt;%</span> }
+ <span style="color: #fff977; background: #2a2a2a;">%&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">ul</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">form</span>
+ <span style="color: #fa8072;">method</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;post&quot;</span>
+ <span style="color: #fa8072;">action</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;/products&quot;</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">input</span>
+ <span style="color: #fa8072;">type</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;text&quot;</span>
+ <span style="color: #fa8072;">name</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;name&quot;</span>
+ <span style="color: #7ee0ce;">/&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;</span><span style="color: #63dac5;">input</span>
+ <span style="color: #fa8072;">type</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;submit&quot;</span>
+ <span style="color: #fa8072;">value</span><span style="color: #d0d0d0;">=</span><span style="color: #87df71;">&quot;Add
+ product&quot;</span> <span style="color: #7ee0ce;">/&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">form</span><span style="color: #7ee0ce;">&gt;</span></p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: #7ee0ce;">&lt;/</span><span style="color: #63dac5;">div</span><span style="color: #7ee0ce;">&gt;</span></p>
+</div>
+<!--EndFragment-->
+<p>We&#39;re asking the browser to POST the content of the form to /products. If you
+try to run the page and submit the form, you&#39;ll notice that OpenRasta comes back
+with a 405 response code, telling us we need to implement a Post method on our
+handler. Let&#39;s add it to our handler.</p>
+<h2>Using raw form data</h2>
+<p>OpenRasta will try to automatically match the content of a form with the
+parameters on the method you defined on your handler.</p>
+<p>In the case of our form, we have input elements that have a name. Multiple
+elements can share the same name.</p>
+<p>At the lowest level, forms can be processed as an IDictionary&lt;string,string[]&gt;,
+where the keys are the name attributes on form items, and the value is an array
+of values, one per input element. Let&#39;s go ahead and add a Post method
+processing the form data and returning the list of products.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ OperationResult</span> Post(<span style="color: #92e4d6;">IDictionary</span><span style="color: #a6a0e0;">&lt;</span><span style="color: #00bfff;">string</span>,
+ <span style="color: #00bfff;">string</span>[]<span style="color: #a6a0e0;">&gt;</span>
+ formData)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ Products<span style="color: #a6a0e0;">.</span>Add(<span style="color: #00bfff;">new</span>
+ <span style="color: #00d2d2;">Product</span> { Name
+ <span style="color: #a6a0e0;">=</span> formData[<span style="color: #fa8072;">&quot;name&quot;</span>][<span style="color: #80ff00;">0</span>]
+ });</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">return</span> <span style="color: #00bfff;">
+ new</span> <span style="color: #00d2d2;">OperationResult</span><span style="color: #a6a0e0;">.</span><span style="color: #00d2d2;">Created</span>
+ { ResponseResource <span style="color: #a6a0e0;">=</span> Products };</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+</div>
+<!--EndFragment-->
+<p>You can now run the page and add a product, and the product will have been
+added.</p>
+<p class="style1">
+<object id="adding_macpro" data="../img/Create-First-Site/adding_macpro.swf" style="width: 599px; height: 327px" type="application/x-shockwave-flash">
+ <param name="movie" value="../img/Create-First-Site/adding_macpro.swf" />
+ <param name="quality" value="High" />
+</object>
+</p>
+<h2>Matching form data by name</h2>
+<p>As our page is now functional, it is time to refactor. In the previous example, we
+used the input name as a string from the raw dictionary containing all the form
+data. Let&#39;s refactor our handler to let OpenRasta match names and values on its
+own.</p>
+<div style="font-family: Consolas, Courier New; font-size: 10pt; color: #e0e0e0; background: #252525; padding: 10px;">
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">public</span> <span style="color: #00d2d2;">
+ OperationResult</span> Post(<span style="color: #00bfff;">string</span>
+ name)</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ Products<span style="color: #a6a0e0;">.</span>Add(<span style="color: #00bfff;">new</span>
+ <span style="color: #00d2d2;">Product</span> { Name
+ <span style="color: #a6a0e0;">=</span> name });</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ <span style="color: #00bfff;">return</span> <span style="color: #00bfff;">
+ new</span> <span style="color: #00d2d2;">OperationResult</span><span style="color: #a6a0e0;">.</span><span style="color: #00d2d2;">OK</span>
+ { ResponseResource <span style="color: #a6a0e0;">=</span> Products };</p>
+ <p style="margin: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
+</div>
+<!--EndFragment-->
+<p>If you run the page, you&#39;ll notice that the matching algorithm assigned the
+form data to the name parameter.</p>
+<p>Of course, you&#39;re not limited to strings. Let&#39;s add a StockCount property to
+our Product class, a stockCount parameter to our Post method, and another text
+field in the view to enter the values.</p>
+<p>&nbsp;</p>
+<p>&nbsp;</p>
+<p>&nbsp;</p>
+<p>&nbsp;</p>
+<p>&nbsp;</p>
+
+</body>
+
+</html>
24 doc/content/default.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta content="en-gb" http-equiv="Content-Language" />
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
+</head>
+
+<body>
+
+<h1>OpenRasta</h1>
+<p>OpenRasta is a resource-centric framework enabling the creation of RESTful
+websites.</p>
+<p>OpenRasta is mostly independent from the application framework supporting its
+functionality. In it&#39;s current form, an asp.net implementation is provided.</p>
+<h2>Tutorials</h2>
+<ol>
+ <li><a href="Tutorials/Create-First-Site.html">Creating your first website</a></li>
+ <li><a href="Tutorials/UsingForms.html">Using forms</a></li>
+</ol>
+
+</body>
+
+</html>
BIN  doc/content/img/Create-First-Site/2008-12-07_1437.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  doc/content/img/Create-First-Site/2008-12-07_1438.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  doc/content/img/Create-First-Site/adding_macpro.swf
Binary file not shown