In general, what you would have is a filter that you can apply at controller
level to handle this.

On Fri, Oct 10, 2008 at 11:07 PM, Will Shaver <[EMAIL PROTECTED]> wrote:

> Hmm.. let me try to explain more what I'm asking. I don't really want each
> controller method to need to determine if it is in long conversation or
> not...
>
>  //current
> public virtual void UnitOfWorkApplication_BeginRequest(object sender,
> EventArgs e)
> {
>  //initialize Ioc
>  currentUnitOfWork = (IUnitOfWork)HttpContext.Current.Session[UnitOfWork
> .CurrentUnitOfWorkKey];
>  if(null)
>   UnitOfWork.Start();
>  etc
> }
>
> I suppose I could just inherit off of this class and change how this works
> to be something like:
> public virtual void UnitOfWorkApplication_BeginRequest(object sender,
> EventArgs e)
> {  //initialize Ioc
>  if(Request.Params[UnitOfWork.UseLongConversationKey] != null)
>   currentUnitOfWork = (IUnitOfWork)HttpContext.Current.Session[UnitOfWork
> .CurrentUnitOfWorkKey];
>
> etc...
>
>
>
>
>
>
>
>   On Fri, Oct 10, 2008 at 1:56 PM, Ayende Rahien <[EMAIL PROTECTED]>
> wrote:
> > Feel free to ask questions here.
> > You can check UnitOfWork.IsInLongConversation and if so, ask to create a
> new
> > one using UnitOfWork.Start(UnitOfWorkOptions.StartNew)
> >
> > On Fri, Oct 10, 2008 at 10:50 PM, Will Shaver <[EMAIL PROTECTED]>
> wrote:
> >>
> >> In reviewing the UnitOfWorkApplication it looks like the application
> >> is either in
> >>  * Long Mode
> >>  * Short Mode
> >>
> >> With no way for the specific request to specify which mode it needs.
> >> For example I may have one section of the site that should never be in
> >> long conversation mode, and another section were a user enters LC and
> >> then leaves it when saving or cancelling. If the user opens up an LC
> >> in one section, then navigates to a separate page (or in my case, an
> >> automated-refresh pulled via ajax) occurs how can I specify that for a
> >> certain request I want the LC and for a different request I don't.
> >>
> >> Sorry to be spamming the list with questions.
> >>  -Will
> >>
> >>
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" 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/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to