I think that if you import the static class, it should work for extension
methods

2009/8/26 João Bragança <[email protected]>

>
> AFAIK you can't use them the same way you would in C#. You can import
> the static class and just use the method as if it were a function.
> <?brail import My.Library.Extensions.MyStaticClass ?>
>
> ${AsWW(datetime)}
>
>
> On Aug 25, 3:32 pm, jsmorris <[email protected]> wrote:
> > Can I use c# extension methods in brail code?  I am getting an error
> > when I try.
> >
> > I have extended the DateTime object to have an AsWW method that
> > encapsulates my company's custom calculation of the week of the year.
> >
> > In my view, I have placed the import to my extension library and then
> > tried to call the method, but I receive an error each time.
> >
> > <?brail import My.Library.Extensions ?>
> >
> > ....
> >
> > ${ datetime.AsWW() }
> >
> > ....
> >
> > I know that I can get around this by using a Helper, ViewComponent, or
> > even an extension of Boo, but was wondering if this is possible.
> >
> > My Google search didn't turn up anything.
> >
> > Thanks,
> > Jason
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to