Oh, I didn't know about the contrib project... :)

Actually I was on the wrong path, trying to extend the Lifestyle attribute.
I thought I could store a particular ASP.NET MVC controller in session, but
that is not possibly anyway :)
So now, all my controllers are created with a PerWebRequest lifestyle.

But another related question: Is it possible to mark a component with an
attribute and not have it overridden in the registration?
I thought the attributes would be the most specific, hence not able to be
overridden in another configuration?

Kenneth

On Tue, Mar 29, 2011 at 22:20, Mauricio Scheffer <[email protected]
> wrote:

> Can you define the lifestyle in the registration instead?
> BTW https://github.com/castleprojectcontrib/Castle.Windsor.Lifestylesalready 
> has per-session implemented, with it you can write:
>
> container.Register(Component.For<Whatever>().LifeStyle.PerWebSession());
>
> --
> Mauricio
>
>
>
> On Tue, Mar 29, 2011 at 9:22 AM, TigerShark <[email protected]>wrote:
>
>> Hi,
>>
>> I would like to create a custom lifestyle attribute (using
>> HttpContext.Session), but I can't create my own attribute inherit from
>> CustomLifestyleAttribute as it is sealed :(
>>
>> Now I have to do:
>> [CustomLifestyle(typeof(PerSessionLifestyleManager))]
>>
>> Instead of just:
>> [SessionLifestyle]
>>
>> Am I on the wrong path or is there an explanation for this design
>> decission?
>>
>>
>> Kenneth
>>
>> --
>> 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.
>>
>>
>  --
> 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.
>



-- 
Med venlig hilsen / Kind regards
Kenneth Siewers Møller

-- 
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.

Reply via email to