Uh, yeah... since Macros would be a logical name for custom macros too...
rev 638
On 3/14/07, Scott Hanselman <Scott@...> wrote:
> You should probably use ".FullName" rather than ".Name" for your cache
> key.
>
> --
> Scott Hanselman - Chief Architect - Corillian Corporation
>
>
> -----Original Message-----
> From: dasblogce-developers-bounces@...
> [mailto:dasblogce-developers-bounces@...] On Behalf Of
> Paul van Brenk
> Sent: Wednesday, March 14, 2007 2:12 AM
> To: Mailing List for dasBlog Developers
> Subject: Re: [DasBlog Dev] Issue with cached macros
>
> checked in rev. 637
>
> On 3/14/07, Scott Hanselman <Scott@...> wrote:
> > I've always wondered about that. That code is insane, truly, and very
> > old. Give it a try...I don't think there's enough methods to care
> about
> > if we cache a few more things. Try it and I'll test it.
> >
> > --
> > Scott Hanselman - Chief Architect - Corillian Corporation
> >
> >
> > -----Original Message-----
> > From: dasblogce-developers-bounces@...
> > [mailto:dasblogce-developers-bounces@...] On Behalf
> Of
> > Paul van Brenk
> > Sent: Tuesday, March 13, 2007 6:58 AM
> > To: Mailing List for dasBlog Developers
> > Subject: [DasBlog Dev] Issue with cached macros
> >
> > I'm seeing an issue when invoking cached macros [0]. I think I know
> > what happens and have a solution, but it's not the cleanest code in
> > the project.. so just to make sure.
> >
> > This is what goes wrong:
> >
> > Both EditMacros derives from Macros and overrides the BodyText Method,
> > all is well when the cached macro is the one defined in the Macros
> > class... but invoking the bodytext on the macos class when the derived
> > class is cached causes the exception.
> >
> > Solution:
> >
> > Use the typename in the key, but the disadvantage is, that we cache
> > even the not overridden methods in the macros class twice (both for
> > the macros and the editmacro class).
> >
> > Any other solutions?
> >
> > hope this makes sense...
> >
> > Paul
> >
> >
> > Error:<br/>Error executing macro: bodytext. Make sure it you're
> > calling it in your BlogTemplate with paratheses like 'myMacro()'.
> > Macros with parameter lists and overloads must be called in this way.
> > Exception: System.Reflection.TargetException: Object does not match
> > target type.
> > at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
> > BindingFlags invokeAttr, Binder binder, Object[] parameters,
> > CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean
> > verifyAccess)
> > at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj,
> > BindingFlags invokeAttr, Binder binder, Object[] parameters,
> > CultureInfo culture, Boolean verifyAccess)
> > at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,
> > BindingFlags invokeAttr, Binder binder, Object[] parameters,
> > CultureInfo culture)
> > at System.Reflection.RuntimePropertyInfo.GetValue(Object obj,
> > Object[] index)
> > at newtelligence.DasBlog.Web.Core.CachedMacro.Invoke(Object obj)
> > at
> > newtelligence.DasBlog.Web.Core.TemplateProcessor.InvokeMacro(Object
> > obj, String expression)
> > at
> >
> newtelligence.DasBlog.Web.Core.TemplateProcessor.ProcessTemplate(SharedB
> > asePage
> > page, Entry entry, String templateString, Control contentPlaceHolder,
> > Macros macros)<br/> while processing .
> >
> > --
> > tel: +31 6 45 086 111 | msn: paul.van.brenk@...
> > web: http://blogs.tamtam.nl/paulb
> >
> >
> ------------------------------------------------------------------------
> > -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> > V
> > _______________________________________________
> > dasBlogCe-Developers mailing list
> > dasBlogCe-Developers@...
> > https://lists.sourceforge.net/lists/listinfo/dasblogce-developers
> >
> >
> ------------------------------------------------------------------------
> -
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > opinions on IT & business topics through brief surveys-and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> V
> > _______________________________________________
> > dasBlogCe-Developers mailing list
> > dasBlogCe-Developers@...
> > https://lists.sourceforge.net/lists/listinfo/dasblogce-developers
> >
>
>
> --
> tel: +31 6 45 086 111 | msn: paul.van.brenk@...
> web: http://blogs.tamtam.nl/paulb
>
> ------------------------------------------------------------------------
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
> V
> _______________________________________________
> dasBlogCe-Developers mailing list
> dasBlogCe-Developers@...
> https://lists.sourceforge.net/lists/listinfo/dasblogce-developers
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> dasBlogCe-Developers mailing list
> dasBlogCe-Developers@...
> https://lists.sourceforge.net/lists/listinfo/dasblogce-developers
>
--
tel: +31 6 45 086 111 | msn: paul.van.brenk@...
web: http://blogs.tamtam.nl/paulb
|