<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Workaround for combining a factory method and Lifetime Manager with Unity</title>
	<atom:link href="http://richarddingwall.name/2009/05/26/workaround-for-combining-a-factory-method-and-lifetimemanager-with-unity/feed/" rel="self" type="application/rss+xml" />
	<link>http://richarddingwall.name/2009/05/26/workaround-for-combining-a-factory-method-and-lifetimemanager-with-unity/</link>
	<description>The adventures of a young kiwi software developer in London</description>
	<lastBuildDate>Tue, 31 Jan 2012 19:56:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ilker</title>
		<link>http://richarddingwall.name/2009/05/26/workaround-for-combining-a-factory-method-and-lifetimemanager-with-unity/comment-page-1/#comment-13327</link>
		<dc:creator>ilker</dc:creator>
		<pubDate>Wed, 31 Mar 2010 13:33:01 +0000</pubDate>
		<guid isPermaLink="false">http://richarddingwall.name/?p=1413#comment-13327</guid>
		<description>Hi
I needed same thing and tried as follows and it works.
We only need &quot;.RegisterType(new UnityPerWebRequestLifetimeManager())&quot; additon before configuration to use type with specified life time manager.

So I thing there is no need any extra work except adding StaticFactoryExtension
Or not ?

container.AddNewExtension();
            container
                .RegisterType(new UnityPerWebRequestLifetimeManager())
                .Configure()
                .RegisterFactory(
                    new FactoryDelegate(c =&gt; Data.NHibernate.NHibernateHelper.OpenSession()));</description>
		<content:encoded><![CDATA[<p>Hi<br />
I needed same thing and tried as follows and it works.<br />
We only need &#8220;.RegisterType(new UnityPerWebRequestLifetimeManager())&#8221; additon before configuration to use type with specified life time manager.</p>
<p>So I thing there is no need any extra work except adding StaticFactoryExtension<br />
Or not ?</p>
<p>container.AddNewExtension();<br />
            container<br />
                .RegisterType(new UnityPerWebRequestLifetimeManager())<br />
                .Configure()<br />
                .RegisterFactory(<br />
                    new FactoryDelegate(c =&gt; Data.NHibernate.NHibernateHelper.OpenSession()));</p>
]]></content:encoded>
	</item>
</channel>
</rss>

