<commit_before>Change history
--------------

Release Candidate 1
===================

- Added support for optional parameters in Brail, using the syntax ?foo will return null if the value was not set (instead of throwing.)

- Fixed a bug where Brail would throw on Empty Views.

- Added support for AutoLoadUnlessKeyIs in ARDataBinder - will load the object unless the key is a specific value
 Usages: public void Save([ARDataBinder(AutoLoadUnlessKeyIs = 0)]User user) 

- Added checks for null id when doing data binding.

- Removed useless error handling from Brail, now you'll get the noraml ASP.Net Yellow Screen Of Death on errors. More consistent with the rest of the framework.

- Added support for <?brail ?> tags for Brail, so it can be valid XML documnets

- Added logging for Brail, so you can see the Boo code the preprocessor is generating.

- Added more verbose output to compiler errors in Brail.

- Changed the way Brail name the generated class, now the chances for name clashes are much lower. (View: Users.boo and a parameter Users will not cause problems).

- Fixed a bug with Brail not picking up changes that occured by VS.Net

- Fixed bug with NVelocity components that caused an InvalidCastException to be thrown by the Render method if there was something other than an IRailsEngineContext occupying the "context" key.

- MonoRail is now CLSCompliant (kudos to <NAME> <<EMAIL>>)

- Breaking change: now MonoRail requires that you add the following module to web.config:

	<system.web>
		<httpModules>
			<add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework" />
		</httpModules>
	</system.web>

- Configuration nodes and attributes changes:
  - mailto to mailTo 
  - mailfrom to mailFrom
  - customsession to customSession

- SmartViewComponent removed

- DataBinder refactored out. Now implementation lies on Castle.Components.Binder
  Big performance improvement

- ARDataBinder now issues a FindByPK for nested objects if the keys differs (existing object with 
  form fields)

- SmartDispatcher: now there's no hardcode reference to DataBind, ARDataBind or ARFetch attributes. 
  They only must implement the interface IParameterBinding. This opens an interesting extension point
  for users willing to create their own logic to binding form/querystring parameters to their data components

- Controller: Added RedirectToAction(String action, params String[] queryStringParameters)
  example:  RedirectToAction("edit", "id=" + id, "error=couldn't update the row");

- Added FlashBinderAttribute (being evaluated)

- Added FormHelper (being evaluated)

- Added CaptureFor component

- Renamed ARPager splitted into ARPaginationHelper and ARPager

- ARDataBinder is now able to deal with HasAndBelongsToMany relations. 
  This works in two ways. Suppose you have a Product class with a relation HasAndBelongsToMany to Category.
  
  If you send the following fields from a form:
    
    product.categories.id=1 
    product.categories.id=2
    
  ARDataBinder will ignore the AutoLoad property and always populate the Categories 
  collection on the product class with the result of FindByPrimaryKey of the categories.
  Any other field will be ignored, for example product.categories.name will not be bound
  
  However, if you send the values like
  
    product.categories[0].id=1 
    product.categories[1].id=2
    
  Then ARDataBinder will use the usual path, not ignoring the AutoLoad.
  
  This behavior is being evaluated.

- Removed AbstractExtension

- Extension now uses events (See ExtensionManager)

- Interface IMonoRailExtension changed (has only Init method now)

- Refactored IParameterBinder in order to make it participate on calculations points.

- Introduced WindsorMonoRailSectionHandler which has the support for statements similar to those supported
  by windsor's XmlInterpreter
  
- Added ARDataBindAttribute.NullWhenPrimaryKey which forces the databinder to
  ignore and do not load a record if the retrieved PK has the value assigned to this
  property (kudos to <NAME> <<EMAIL>>)

Beta 5
======

** Core ** 

- Fixed Flash (it now persists the new entries between requests)  (by Ahmed)

- Added FilterAttribute.ExecutionOrder, the default value is Int32.MaxValue 
  so the less the value higher will be the filter priority

- Added Controller.RedirectToAction(String actionName)

- Added Controller.RedirectToAction overloads (by <NAME>)

- Controller.Redirect(String) is now virtual, and it's called by all Redirect* methods (by <NAME>)

- Moved action collection to ControllerMetaDescriptor class, using new method that does not require ScreenCommonPublicMethods.

- Moved ControllerDescriptorBuilder creation to ProcessEngineFactory to ensure ControllerDescriptors are only created once

- ITrace and Trace property added to IRailsEngineContext (kudos to Chad Humphries)

- Hierarchy of areas support (kudos to Fabio Batista)

- Support for [Layout] attribute on Actions, so actions can override 
  the Controller's specified layout (by <NAME>, rev 1459)

- PaginationHelper introduced: paginates objects that implements IList, and supports caching.

- ARPager introduced: allows you to specify a custom NHibernate HQL Query or an NHibernate Criteria
  (using Expression.Eq,  l ActiveRecord's FindAll()) and fetch the results with pagination.
  (by <NAME>)

- Added IServerUtility.JavaScriptEscape() (kudos to Chad Humphries)

- Added DataBindAttribute.Exclude - A comma separated list of property names 
  to exclude from databinding (kudos to Chad Humphries)

- Added IResponse.BinaryWrite() and CreateCookie( HttpCookie ) overload

- Added IServerUtility.MapPath()

- Added IRailsContext.ApplicationPhysicalPath

- Added to HtmlHelper:
  - InputCheckbox
  
  - InputRadio
  - InputFile
  - InputButton
  - Form(action, attribtes) overload

- Added more fine-grained support for ExecuteEnum in Filters (by <NAME>, rev 1286-1287)

    The values are now: BeforeAction, AfterAction, AfterRendering and Always.
  
- Support for nullable types in SmartDispatcherController, useful for
  detecting missing ValueType parameters. Works with Nullables library, still
  not working on .NET 2.0 Nullables (by <NAME>, rev 1297 and 1363)

  Example of use:

    // .NET 1.1
    public void CreateTicket(string name, NullableDateTime date, NullableInt32 priority)
    {
      if (name == null || name.Length == 0) throw new MissingFieldException();
      if (!date.HasValue) throw new MissingFieldException();
      if (!priority.HasValue) throw new MissingFieldException();
    }

    // .NET 2.0 (NOT WORKING YET)
    public void CreateTicket(string name, DateTime? date, int? priority)
    {
      if (name == null || name.Length == 0) throw new MissingFieldException();
      if (!date.HasValue) throw new MissingFieldException();
      if (!priority.HasValue) throw new MissingFieldException();
    }

- Broaded support for Enums. They can be specified by number or by text (by <NAME>, rev 1203)

  public enum MyEnum {
    First = 1,
    Second = 2
  }
  
  <input type="hidden" name="myEnumValue" value="1" />
  <input type="hidden" name="myOtherEnumValue" value="seCoNd" />
  
  public void TestEnumValues(MyEnum myEnumValue, MyEnum myOtherEnumValue)
  {
    if (myEnumValue == MyEnum.First) // ok
    if (myOtherEnumValue == MyEnum.Second) // ok
  }

- Support for Active Record fetching in Castle.MonoRail.ActiveRecordSupport
  (by <NAME>, rev. 1380).
	
	Mainly for those unconfortable with direct binding of form values
	to ActiveRecord objects. This attribute only fetches the ActiveRecord based
	on its Primary Key, nothing more.
	
	Usage:
	
		public class MyCrudExample : ARSmartDispatchController
		{
			// simple usage.
			public void Save( [ARFetch] Example example, string name, ...)
			{
				example.Name = name;
				// ...
				
				example.Save();<commit_msg>Minor changes<commit_after>Change history
--------------

Release Candidate 1
===================

- Added support for optional parameters in Brail, using the syntax ?foo will return null if the value was not set (instead of throwing.)

- Fixed a bug where Brail would throw on Empty Views.

- Added support for AutoLoadUnlessKeyIs in ARDataBinder - will load the object unless the key is a specific value
 Usages: public void Save([ARDataBinder(AutoLoadUnlessKeyIs=0)] User user) 

- Added checks for null id when doing data binding.

- Removed useless error handling from Brail, now you'll get the normal ASP.Net Yellow Screen Of Death on errors. More consistent with the rest of the framework.

- Added support for <?brail ?> tags for Brail, so it can be valid XML documents

- Added logging for Brail, so you can see the Boo code the preprocessor is generating.

- Added more verbose output to compiler errors in Brail.

- Changed the way Brail name the generated class, now the chances for name clashes are much lower. (View: Users.boo and a parameter Users will not cause problems).

- Fixed a bug with Brail not picking up changes that occured by VS.Net

- Fixed bug with NVelocity components that caused an InvalidCastException to be thrown by the Render method if there was something other than an IRailsEngineContext occupying the "context" key.

- MonoRail is now CLSCompliant (kudos to <NAME> <<EMAIL>>)

- Breaking change: now MonoRail requires that you add the following module to web.config:

	<system.web>
		<httpModules>
			<add name="monorail" type="Castle.MonoRail.Framework.EngineContextModule, Castle.MonoRail.Framework" />
		</httpModules>
	</system.web>

- Configuration nodes and attributes changes:
  - mailto to mailTo 
  - mailfrom to mailFrom
  - customsession to customSession

- SmartViewComponent removed

- DataBinder refactored out. Now implementation lies on Castle.Components.Binder
  + Big performance improvement

- ARDataBinder now issues a FindByPK for nested objects if the keys differs (existing object with 
  form fields)

- SmartDispatcherController: now there's no hardcode reference to DataBind, ARDataBind or ARFetch attributes. 
  They only must implement the interface IParameterBinding. This opens an interesting extension point
  for users willing to create their own logic to binding form/querystring parameters to their data components

- Controller: Added RedirectToAction(String action, params String[] queryStringParameters)
  example:  RedirectToAction("edit", "id=" + id, "error=couldn't update the row");

- Added FlashBinderAttribute (being evaluated)

- Added FormHelper (being evaluated)

- Added CaptureFor component

- Renamed ARPager splitted into ARPaginationHelper and ARPager

- ARDataBinder is now able to deal with HasAndBelongsToMany relations. 
  This works in two ways. Suppose you have a Product class with a relation HasAndBelongsToMany to Category.
  
  If you send the following fields from a form:
    
    product.categories.id=1 
    product.categories.id=2
    
  ARDataBinder will ignore the AutoLoad property and always populate the Categories 
  collection on the product class with the result of FindByPrimaryKey of the categories.
  Any other field will be ignored, for example product.categories.name will not be bound
  
  However, if you send the values like
  
    product.categories[0].id=1 
    product.categories[1].id=2
    
  Then ARDataBinder will use the usual path, not ignoring the AutoLoad.
  
  This behavior is being evaluated.

- Removed AbstractExtension

- Extension now uses events (See ExtensionManager)

- Interface IMonoRailExtension changed (has only Init method now)

- Refactored IParameterBinder in order to make it participate on calculations points.

- Introduced WindsorMonoRailSectionHandler which has the support for statements similar to those supported
  by windsor's XmlInterpreter
  
- Added ARDataBindAttribute.NullWhenPrimaryKey which forces the databinder to
  ignore and do not load a record if the retrieved PK has the value assigned to this
  property (kudos to <NAME> <<EMAIL>>)

Beta 5
======

** Core ** 

- Fixed Flash (it now persists the new entries between requests)  (by Ahmed)

- Added FilterAttribute.ExecutionOrder, the default value is Int32.MaxValue 
  so the less the value higher will be the filter priority

- Added Controller.RedirectToAction(String actionName)

- Added Controller.RedirectToAction overloads (by <NAME>)

- Controller.Redirect(String) is now virtual, and it's called by all Redirect* methods (by <NAME>)

- Moved action collection to ControllerMetaDescriptor class, using new method that does not require ScreenCommonPublicMethods.

- Moved ControllerDescriptorBuilder creation to ProcessEngineFactory to ensure ControllerDescriptors are only created once

- ITrace and Trace property added to IRailsEngineContext (kudos to Chad Humphries)

- Hierarchy of areas support (kudos to Fabio Batista)

- Support for [Layout] attribute on Actions, so actions can override 
  the Controller's specified layout (by <NAME>, rev 1459)

- PaginationHelper introduced: paginates objects that implements IList, and supports caching.

- ARPager introduced: allows you to specify a custom NHibernate HQL Query or an NHibernate Criteria
  (using Expression.Eq,  l ActiveRecord's FindAll()) and fetch the results with pagination.
  (by <NAME>)

- Added IServerUtility.JavaScriptEscape() (kudos to Chad Humphries)

- Added DataBindAttribute.Exclude - A comma separated list of property names 
  to exclude from databinding (kudos to Chad Humphries)

- Added IResponse.BinaryWrite() and CreateCookie( HttpCookie ) overload

- Added IServerUtility.MapPath()

- Added IRailsContext.ApplicationPhysicalPath

- Added to HtmlHelper:
  - InputCheckbox
  - InputRadio
  - InputFile
  - InputButton
  - Form(action, attribtes) overload

- Added more fine-grained support for ExecuteEnum in Filters (by <NAME>, rev 1286-1287)

    The values are now: BeforeAction, AfterAction, AfterRendering and Always.
  
- Support for nullable types in SmartDispatcherController, useful for
  detecting missing ValueType parameters. Works with Nullables library, still
  not working on .NET 2.0 Nullables (by Fabio Batista, rev 1297 and 1363)

  Example of use:

    // .NET 1.1
    public void CreateTicket(string name, NullableDateTime date, NullableInt32 priority)
    {
      if (name == null || name.Length == 0) throw new MissingFieldException();
      if (!date.HasValue) throw new MissingFieldException();
      if (!priority.HasValue) throw new MissingFieldException();
    }

    // .NET 2.0 (NOT WORKING YET)
    public void CreateTicket(string name, DateTime? date, int? priority)
    {
      if (name == null || name.Length == 0) throw new MissingFieldException();
      if (!date.HasValue) throw new MissingFieldException();
      if (!priority.HasValue) throw new MissingFieldException();
    }

- Broaded support for Enums. They can be specified by number or by text (by <NAME>, rev 1203)

  public enum MyEnum {
    First = 1,
    Second = 2
  }
  
  <input type="hidden" name="myEnumValue" value="1" />
  <input type="hidden" name="myOtherEnumValue" value="seCoNd" />
  
  public void TestEnumValues(MyEnum myEnumValue, MyEnum myOtherEnumValue)
  {
    if (myEnumValue == MyEnum.First) // ok
    if (myOtherEnumValue == MyEnum.Second) // ok
  }

- Support for ActiveRecord fetching in Castle.MonoRail.ActiveRecordSupport
  (by <NAME>, rev. 1380).
	
	Mainly for those unconfortable with direct binding of form values
	to ActiveRecord objects. This attribute only fetches the ActiveRecord based
	on its Primary Key, nothing more.
	
	Usage:
	
		public class MyCrudExample : ARSmartDispatchController
		{
			// simple usage.
			public void Save( [ARFetch] Example example, string name, ...)
			{
				example.Name = name;
				// ...
				
				example.Save();
{'fraction_non_alphanumeric': 0.0678041354814157, 'fraction_numerical': 0.006596473423823418, 'mean_word_length': 4.026139623844437, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2806831', 'n_tokens_mistral': 4491, 'n_tokens_neox': 4167, 'n_words': 1860}