I imagine it has all the same problems that you have been
experiencing. It is the same routing engine, just with a few classes
to make it easier to use for the developer.
On 25 Oct 2008, at 03:23, hammett <[EMAIL PROTECTED]> wrote:
>
> Very interesting! Isn't ordering a problem?
>
> On Fri, Oct 24, 2008 at 3:27 AM, Lee Henson <[EMAIL PROTECTED]>
> wrote:
>> The codegenerator project uses attributes to generate routes. For
>> example:
>>
>> [PatternRoute("ShowProductsInCategory", "/<category>/products")]
>> public void ShowProductsInCategoryAction(string category) {
>> }
>>
>> running the codegenerator creates the following on your sitemap:
>>
>> public partial class ShowProductsInCategoryRoute :
>> Castle.MonoRail.Framework.Routing.PatternRoute {
>> public ShowProductsInCategoryRoute() :
>> base("ShowProductsInCategory", "<category>/products") {
>> }
>>
>> public partial class RequiredParameters {
>> public const string category = "category";
>> }
>>
>> public partial class OptionalParameters {
>> }
>> }
>>
>> public static ShowProductsInCategoryRoute ShowProductsInCategory {
>> get {
>> return new ShowProductsInCategoryRoute();
>> }
>> }
>>
>> which you register in global.asax like:
>>
>> RoutingModuleEx.Engine.Add(RouteDefinitions.ShowProductsInCategory);
>>
>> and you can generate at runtime by doing:
>>
>> TypedPropertyBag.ProductsLink = new
>> Routes(Context).ShowProductsInCategory("cars");
>>
>> 2008/10/23 hammett <[EMAIL PROTECTED]>
>>>
>>> I remember some discussions towards this, but couldnt find any
>>> code/sample. I was think that this might be a right step towards
>>> ambiguity resolution.
>>> Can you refer me to some code/sample on how you're using this?
>>>
>>> --
>>> Cheers,
>>> hammett
>>> http://hammett.castleproject.org/
>>>
>>>
>>
>>
>>>
>>
>
>
>
> --
> Cheers,
> hammett
> http://hammett.castleproject.org/
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---