<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>MugenInjection Wiki Rss Feed</title><link>http://mugeninjection.codeplex.com/</link><description>MugenInjection Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=22</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Project Description&lt;/h2&gt;The MugeniInjection is a lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property and method call injection. For more information, see the &lt;a href="http://mugeninjection.codeplex.com/documentation?referringTitle=Home"&gt;documentation&lt;/a&gt; and &lt;a href="http://mugeninjection.codeplex.com/releases/view/103394"&gt;examples&lt;/a&gt;.&lt;br /&gt;&lt;i&gt;If you have any ideas for future releases write them &lt;a href="http://vvson.net/Projects/en-US/Documentation/mugen-injection-ideas#content"&gt;here&lt;/a&gt;.&lt;/i&gt;
&lt;h2&gt;Supported platforms:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NET 2.0 - 4.5&lt;/li&gt;
&lt;li&gt;WinRT&lt;/li&gt;
&lt;li&gt;Silverlight 4-5&lt;/li&gt;
&lt;li&gt;Windows phone 7.1-8.0&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-mvc#content"&gt;MVC 2-4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-wcf#content"&gt;WCF&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Extensions:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NServiceBus.ObjectBuilder&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-interception#content"&gt;Interceptors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Xml configuration&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-logging#content"&gt;Log4Net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-logging#content"&gt;NLog2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Wed, 03 Apr 2013 08:33:40 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130403083340A</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=21</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Project Description&lt;/h2&gt;The MugeniInjection is a lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property and method call injection. For more information, see the &lt;a href="http://mugeninjection.codeplex.com/documentation?referringTitle=Home"&gt;documentation&lt;/a&gt; and &lt;a href="http://mugeninjection.codeplex.com/releases/view/103394"&gt;examples&lt;/a&gt;.&lt;br /&gt;&lt;i&gt;If you have ideas for future releases write them &lt;a href="http://vvson.net/Projects/en-US/Documentation/mugen-injection-ideas#content"&gt;here&lt;/a&gt;.&lt;/i&gt;
&lt;h2&gt;Supported platforms:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NET 2.0 - 4.5&lt;/li&gt;
&lt;li&gt;WinRT&lt;/li&gt;
&lt;li&gt;Silverlight 4-5&lt;/li&gt;
&lt;li&gt;Windows phone 7.1-8.0&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-mvc#content"&gt;MVC 2-4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-wcf#content"&gt;WCF&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Extensions:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NServiceBus.ObjectBuilder&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-interception#content"&gt;Interceptors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Xml configuration&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-logging#content"&gt;Log4Net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vvson.net/Projects/en-US/Documentation/integration-logging#content"&gt;NLog2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sat, 30 Mar 2013 08:23:06 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130330082306A</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=20</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Project Description&lt;/h2&gt;The MugeniInjection is a lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property and method call injection. For more information, see the &lt;a href="http://mugeninjection.codeplex.com/documentation?referringTitle=Home"&gt;documentation&lt;/a&gt; and &lt;a href="http://mugeninjection.codeplex.com/releases/view/103394"&gt;examples&lt;/a&gt;.
&lt;h2&gt;Supported platforms:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NET 2.0 - 4.5&lt;/li&gt;
&lt;li&gt;WinRT&lt;/li&gt;
&lt;li&gt;Silverlight 4-5&lt;/li&gt;
&lt;li&gt;Windows phone 7.1-8.0&lt;/li&gt;
&lt;li&gt;MVC 2-4&lt;/li&gt;
&lt;li&gt;WCF&lt;/li&gt;&lt;/ul&gt;
&lt;h2&gt;Extensions:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;NServiceBus.ObjectBuilder&lt;/li&gt;
&lt;li&gt;Interceptors&lt;/li&gt;
&lt;li&gt;Xml configuration&lt;/li&gt;
&lt;li&gt;Log4Net&lt;/li&gt;
&lt;li&gt;NLog2&lt;/li&gt;&lt;/ul&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Thu, 14 Mar 2013 17:19:44 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130314051944P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://mugeninjection.codeplex.com/documentation?version=17</link><description>&lt;div class="wikidoc"&gt;Documentation in English is available &lt;a href="http://vvson.net/Projects/en-US/Project/mugeninjection"&gt;here&lt;/a&gt;.&lt;br /&gt;Documentation in Russian is available &lt;a href="http://vvson.net/Projects/ru-RU/Project/mugeninjection"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Thu, 14 Mar 2013 16:53:18 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20130314045318P</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=19</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
A lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property, field, and method call injection. See
&lt;a title="Documentation" href="http://mugeninjection.codeplex.com/documentation" target="_self"&gt;
documentation&lt;/a&gt; and &lt;a title="example" href="http://mugeninjection.codeplex.com/releases/view/95456" target="_self"&gt;
example&lt;/a&gt;&amp;nbsp;for more detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NET 2.0 - 4.5.&amp;nbsp; &lt;/li&gt;&lt;li&gt;WinRT &lt;/li&gt;&lt;li&gt;Silverlight 3-5 &lt;/li&gt;&lt;li&gt;Windows phone 7-7.1&amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported MVC 2 - 4 &amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported WCF &lt;/li&gt;&lt;li&gt;Supported NServiceBus.ObjectBuilder &lt;/li&gt;&lt;li&gt;Supports private protected internal injection in Silverlight(4-5). &lt;/li&gt;&lt;li&gt;Supports interceptors. &lt;/li&gt;&lt;li&gt;Easy integration with libraries for logging(Log4Net, NLog2). &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Available in nuget&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color:#202020; border:4px solid #C0C0C0; color:#e2e2e2; display:block; font:1.5em/1.5em 'andale mono','lucida console',monospace; overflow:auto; padding:15px"&gt;
PM&amp;gt; Install-Package MugenInjection&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sat, 29 Sep 2012 16:57:51 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120929045751P</guid></item><item><title>Updated Wiki: Documentation</title><link>http://mugeninjection.codeplex.com/documentation?version=16</link><description>&lt;div class="wikidoc"&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Registrating%20bindings&amp;referringTitle=Documentation"&gt;Registrating bindings&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Registrating%20bindings%20%28Extended%29&amp;referringTitle=Documentation"&gt;Registrating bindings &amp;#40;Extended&amp;#41;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Child%20container&amp;referringTitle=Documentation"&gt;Child container&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Settings&amp;referringTitle=Documentation"&gt;Settings&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Lifecycle%20scope&amp;referringTitle=Documentation"&gt;Lifecycle scope&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Work%20with%20parameters.&amp;referringTitle=Documentation"&gt;Work with parameters.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Custom%20parameter%20passing&amp;referringTitle=Documentation"&gt;Custom parameter passing&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Activators%20of%20objects.&amp;referringTitle=Documentation"&gt;Activators of objects.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Work%20with%20modules&amp;referringTitle=Documentation"&gt;Work with modules&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Events&amp;referringTitle=Documentation"&gt;Events&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Specified%20condition%20for%20bindings.&amp;referringTitle=Documentation"&gt;Specified condition for bindings.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Named%20binding&amp;referringTitle=Documentation"&gt;Named binding&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Select%20specific%20constructor.&amp;referringTitle=Documentation"&gt;Select specific constructor.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Priority%20bindings&amp;referringTitle=Documentation"&gt;Priority bindings&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=WCF&amp;referringTitle=Documentation"&gt;WCF&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=MVC&amp;referringTitle=Documentation"&gt;MVC&lt;/a&gt;&lt;br /&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Performance&amp;referringTitle=Documentation"&gt;Performance&lt;/a&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 12:32:17 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Documentation 20120812123217P</guid></item><item><title>Updated Wiki: Registrating bindings (Extended)</title><link>http://mugeninjection.codeplex.com/wikipage?title=Registrating bindings (Extended)&amp;version=1</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Using Parameters&lt;/h2&gt;When you register service you can specify the &lt;b&gt;IInjectionParameter&lt;/b&gt;, available parameter types:
&lt;ul&gt;&lt;li&gt;ConstructorParameter - represents the value of a constructor argument.&lt;/li&gt;
&lt;li&gt;FieldParameter - represents the value of a field parameter.&lt;/li&gt;
&lt;li&gt;PropertyParameter - represents the value of a property parameter.&lt;/li&gt;
&lt;li&gt;MethodParameter - represents the value of a method parameter.&lt;/li&gt;&lt;/ul&gt;
You can easily extend this list by implementing the interface &lt;b&gt;IInjectionParameter&lt;/b&gt;.&lt;br /&gt;This code shows how to add parameters to binding:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;A&amp;gt;().ToSelf()
                .WithConstructorArgument(&lt;span style="color:#A31515;"&gt;&amp;quot;arg&amp;quot;&lt;/span&gt;, 1)
                .WithFieldValue(&lt;span style="color:#A31515;"&gt;&amp;quot;field&amp;quot;&lt;/span&gt;, &lt;span style="color:#A31515;"&gt;&amp;quot;field&amp;quot;&lt;/span&gt;)
                .WithPropertyValue(&lt;span style="color:#A31515;"&gt;&amp;quot;property&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C())
                .WithMethodArgument(&lt;span style="color:#A31515;"&gt;&amp;quot;methodName&amp;quot;&lt;/span&gt;, &lt;span style="color:#A31515;"&gt;&amp;quot;arg&amp;quot;&lt;/span&gt;, &lt;span style="color:#A31515;"&gt;&amp;quot;st&amp;quot;&lt;/span&gt;)
                .WithParameter(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; CustomParameter());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using Named bindings&lt;/h2&gt;Services can be further identified using a service name. Names are not necessarily unique; multiple bindings for a given service may be registered with the same name:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf();
injector.Bind&amp;lt;Alfa&amp;gt;().To&amp;lt;Beta&amp;gt;().NamedBinding(&lt;span style="color:#A31515;"&gt;&amp;quot;Beta&amp;quot;&lt;/span&gt;);
injector.Bind&amp;lt;Alfa&amp;gt;().To&amp;lt;Bravo&amp;gt;().NamedBinding(&lt;span style="color:#A31515;"&gt;&amp;quot;Bravo&amp;quot;&lt;/span&gt;);

&lt;span style="color:Blue;"&gt;var&lt;/span&gt; alfa = injector.Get&amp;lt;Alfa&amp;gt;();&lt;span style="color:Green;"&gt;//Instance of Alfa.&lt;/span&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; beta = injector.Get&amp;lt;Alfa&amp;gt;(&lt;span style="color:#A31515;"&gt;&amp;quot;Beta&amp;quot;&lt;/span&gt;);&lt;span style="color:Green;"&gt;//Instance of Beta.&lt;/span&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; bravo = injector.Get&amp;lt;Alfa&amp;gt;(&lt;span style="color:#A31515;"&gt;&amp;quot;Bravo&amp;quot;&lt;/span&gt;);&lt;span style="color:Green;"&gt;//Instance of Bravo.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using a condition for bindings&lt;/h2&gt;When you register service you can specify the condition for bindings, available conditions:
&lt;ul&gt;&lt;li&gt;WhenInto - Indicates that the binding should be used only for injections on the specified type. Types that derive from the specified type will not be considered as valid target.&lt;/li&gt;
&lt;li&gt;WhenIntoIsAssignable - Indicates that the binding should be used only for injections on the specified type. Types that derive from the specified type are considered as valid targets.&lt;/li&gt;
&lt;li&gt;WhenNamespaceEqual - Indicates that the binding should be used only for injections on the specified type when namespace equals.&lt;/li&gt;
&lt;li&gt;WhenClassHasAttribute - Indicates that the binding should be used only when the class being injected has an attribute of the specified type.&lt;/li&gt;
&lt;li&gt;When - Indicates that the binding should be used only for requests that support the specified condition.&lt;/li&gt;&lt;/ul&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf()
                .When(context =&amp;gt; context.TypeInto != &lt;span style="color:Blue;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; context.TypeInto.FullName.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;S&amp;quot;&lt;/span&gt;));
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf()
                .WhenInto&amp;lt;Beta&amp;gt;();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf()
                .WhenIntoIsAssignable&amp;lt;Alfa&amp;gt;();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf()
                .WhenClassHasAttribute&amp;lt;SerializableAttribute&amp;gt;();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf()
                .WhenNamespaceEqual(&lt;span style="color:#A31515;"&gt;&amp;quot;Test&amp;quot;&lt;/span&gt;);
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Set an IActivator&lt;/h2&gt;By default, the &lt;b&gt;IActivator&lt;/b&gt; for binding is used from configuration of the &lt;b&gt;IInjector&lt;/b&gt;, but you can change this. When you register service you can specify the &lt;b&gt;IActivator&lt;/b&gt; that will use for create service, available &lt;b&gt;IActivator&lt;/b&gt;:
&lt;ul&gt;&lt;li&gt;ReflectionActivator - for creating objects using reflection (Available on all platforms). &lt;/li&gt;
&lt;li&gt;EmitActivator - for creating objects using emit (Available on all platforms except Windows phone 7). &lt;/li&gt;
&lt;li&gt;ExpressionActivator - for creating objects using expression trees (Available on all platforms except Windows phone 7 and NET 2).&lt;/li&gt;&lt;/ul&gt;
You can easily extend this list by implementing the interface &lt;b&gt;IActivator&lt;/b&gt;.&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().UseEmitActivator();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().UseReflectionActivator();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().UseExpressionActivator();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().UseCustomActivator(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; YourCustomActivator());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Set an IConstructorResolver&lt;/h2&gt;By default, the &lt;b&gt;IConstructorResolver&lt;/b&gt; for binding is used from configuration of the &lt;b&gt;IInjector&lt;/b&gt;, but you can change this. When you register service you can specify the &lt;b&gt;IConstructorResolver&lt;/b&gt;&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().UseCustomConstructorResolver(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; CustomConstructorResolver());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Select a special constructor&lt;/h2&gt;When you register service you can specify the constructor that will use for create service:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().TakeConstructor&amp;lt;Bravo&amp;gt;();
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().TakeConstructor(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; Type[] { &lt;span style="color:Blue;"&gt;typeof&lt;/span&gt;(Bravo) });
&lt;/pre&gt;&lt;/div&gt;If the constructor is not found you will get an error InvalidBindingException:&lt;br /&gt;&lt;i&gt;The constructor with &amp;#39;MugenInjectionDocumentation.Bravo&amp;#39; type(s) not found in service MugenInjectionDocumentation.Alfa.&lt;/i&gt;&lt;br /&gt;
&lt;h2&gt;Using a binding priority&lt;/h2&gt;When you register service you can specify the binding priority:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().SetStandardPriority();
injector.Bind&amp;lt;Alfa&amp;gt;().To&amp;lt;Beta&amp;gt;().SetLowPriority();
injector.Bind&amp;lt;Alfa&amp;gt;().To&amp;lt;Bravo&amp;gt;().SetNormalPriority();

&lt;span style="color:Blue;"&gt;var&lt;/span&gt; bravo = injector.Get&amp;lt;Alfa&amp;gt;();&lt;span style="color:Green;"&gt;//Instance of Bravo.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Other settings&lt;/h2&gt;When you register service you can specify behavior after dispose binding, you can try dispose the object after binding disposed.&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToSelf().TryDisposeObjects();
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 12:16:38 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Registrating bindings (Extended) 20120812121638P</guid></item><item><title>Updated Wiki: Registrating bindings</title><link>http://mugeninjection.codeplex.com/wikipage?title=Registrating bindings&amp;version=4</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Registrating bindings&lt;/h2&gt;Bindings are registered with &lt;b&gt;IInjectorBinder&lt;/b&gt;.&lt;br /&gt;Bindings can be created using lambda expressions, by reflection, by method delegate, or by providing a ready-made instance.&lt;br /&gt;Bindings are created using the Bind method of &lt;b&gt;IInjectorBinder&lt;/b&gt;:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;interface&lt;/span&gt; IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Alfa { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Beta : Alfa, IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Bravo : Beta { }

&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;IInterface&amp;gt;().To&amp;lt;Beta&amp;gt;();
injector.Bind&amp;lt;Alfa, Beta&amp;gt;().To&amp;lt;Bravo&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;All registered services are checked and if you are write this code:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Bravo)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Alfa));
&lt;/pre&gt;&lt;/div&gt;you are get an error InvalidBindingException:&lt;br /&gt;&lt;i&gt;The service MugenInjectionDocumentation.Bravo not assignable from MugenInjectionDocumentation.Alfa.&lt;/i&gt;&lt;br /&gt;
&lt;h2&gt;Using Reflection&lt;/h2&gt;As you can see bindings can creating using Reflection. &lt;br /&gt;Also supported open generic types:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (IRepository&amp;lt;&amp;gt;)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Repository&amp;lt;&amp;gt;));
injector.Get&amp;lt;IRepository&amp;lt;Alfa&amp;gt;&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;container supported self bindable types, if you are write this code, it will be correct:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Get&amp;lt;Alfa&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using method delegate&lt;/h2&gt;MugenInjector can accept a delegate to be used as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().ToMethod(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.CallInjector.Get&amp;lt;A&amp;gt;()));
&lt;/pre&gt;&lt;/div&gt;For generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; T MethodBindingDelegate&amp;lt;&lt;span style="color:Blue;"&gt;out&lt;/span&gt; T&amp;gt;(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;For non-generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; &lt;span style="color:Blue;"&gt;object&lt;/span&gt; MethodBindingDelegate(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;It takes &lt;b&gt;IBindingContext&lt;/b&gt; and returns an instance of service, more about &lt;b&gt;IBindingContext&lt;/b&gt; see this.&lt;br /&gt;
&lt;h2&gt;Using Constant&lt;/h2&gt;MugenInjector can accept a ready-made instance as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToConstant(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; Alfa());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using Expressions (only expression supported platforms)&lt;/h2&gt;MugenInjector can accept a lambda expression to be used for creating binding:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().To(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.Resolve&amp;lt;A&amp;gt;()) {C = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C()});
&lt;/pre&gt;&lt;/div&gt;This code is equivalent to:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;B&amp;gt;().ToSelf().TakeConstructor&amp;lt;A&amp;gt;().WithPropertyValue&amp;lt;C&amp;gt;(&lt;span style="color:#A31515;"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C());
&lt;/pre&gt;&lt;/div&gt;The expression not used for create service, it&amp;#39;s used only for create binding.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Almost all methods described above have different overload.&lt;/i&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 11:38:44 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Registrating bindings 20120812113844A</guid></item><item><title>Updated Wiki: Registrating bindings</title><link>http://mugeninjection.codeplex.com/wikipage?title=Registrating bindings&amp;version=3</link><description>&lt;div class="wikidoc"&gt;&lt;h2&gt;Registrating bindings&lt;/h2&gt;Bindings are registered with &lt;b&gt;IInjectorBinder&lt;/b&gt;.&lt;br /&gt;Bindings can be created using lambda expressions, by reflection, by method delegate, or by providing a ready-made instance.&lt;br /&gt;Bindings are created using the Bind method of &lt;b&gt;IInjectorBinder&lt;/b&gt;:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;interface&lt;/span&gt; IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Alfa { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Beta : Alfa, IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Bravo : Beta { }

&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;IInterface&amp;gt;().To&amp;lt;Beta&amp;gt;();
injector.Bind&amp;lt;Alfa, Beta&amp;gt;().To&amp;lt;Bravo&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;All registered services are checked and if you are write this code:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Bravo)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Alfa));
&lt;/pre&gt;&lt;/div&gt;you are get error InvalidBindingException:&lt;br /&gt;&lt;i&gt;The service MugenInjectionDocumentation.Bravo not assignable from MugenInjectionDocumentation.Alfa.&lt;/i&gt;&lt;br /&gt;
&lt;h2&gt;Using Reflection&lt;/h2&gt;As you can see bindings can creating using Reflection. &lt;br /&gt;Also supported open generic types:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (IRepository&amp;lt;&amp;gt;)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Repository&amp;lt;&amp;gt;));
injector.Get&amp;lt;IRepository&amp;lt;Alfa&amp;gt;&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;container supported self bindable types, if you are write this code, it will be correct:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Get&amp;lt;Alfa&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using method delegate&lt;/h2&gt;MugenInjector can accept a delegate to be used as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().ToMethod(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.CallInjector.Get&amp;lt;A&amp;gt;()));
&lt;/pre&gt;&lt;/div&gt;For generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; T MethodBindingDelegate&amp;lt;&lt;span style="color:Blue;"&gt;out&lt;/span&gt; T&amp;gt;(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;For non-generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; &lt;span style="color:Blue;"&gt;object&lt;/span&gt; MethodBindingDelegate(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;It takes &lt;b&gt;IBindingContext&lt;/b&gt; and returns an instance of service, more about &lt;b&gt;IBindingContext&lt;/b&gt; see this.&lt;br /&gt;
&lt;h2&gt;Using Constant&lt;/h2&gt;MugenInjector can accept a ready-made instance as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToConstant(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; Alfa());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using Expressions (only expression supported platforms)&lt;/h2&gt;MugenInjector can accept a lambda expression to be used for creating binding:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().To(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.Resolve&amp;lt;A&amp;gt;()) {C = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C()});
&lt;/pre&gt;&lt;/div&gt;This code is equivalent to:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;B&amp;gt;().ToSelf().TakeConstructor&amp;lt;A&amp;gt;().WithPropertyValue&amp;lt;C&amp;gt;(&lt;span style="color:#A31515;"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C());
&lt;/pre&gt;&lt;/div&gt;The expression not used for create service, it&amp;#39;s used only for create binding.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Almost all methods described above have different overload.&lt;/i&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 11:07:03 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Registrating bindings 20120812110703A</guid></item><item><title>Updated Wiki: Registrating bindings</title><link>http://mugeninjection.codeplex.com/wikipage?title=Registrating bindings&amp;version=2</link><description>&lt;div class="wikidoc"&gt;&lt;br /&gt;&lt;br /&gt;Bindings are registered with &lt;b&gt;IInjectorBinder&lt;/b&gt;.&lt;br /&gt;Bindings can be created using lambda expressions, by reflection, by method delegate, or by providing a ready-made instance.&lt;br /&gt;Bindings are created using the Bind method of &lt;b&gt;IInjectorBinder&lt;/b&gt;:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;interface&lt;/span&gt; IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Alfa { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Beta : Alfa, IInterface { }
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;class&lt;/span&gt; Bravo : Beta { }

&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;IInterface&amp;gt;().To&amp;lt;Beta&amp;gt;();
injector.Bind&amp;lt;Alfa, Beta&amp;gt;().To&amp;lt;Bravo&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;All registered services are checked and if you are write this code:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Bravo)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Alfa));
&lt;/pre&gt;&lt;/div&gt;you are get error InvalidBindingException:&lt;br /&gt;&lt;i&gt;The service MugenInjectionDocumentation.Bravo not assignable from MugenInjectionDocumentation.Alfa.&lt;/i&gt;&lt;br /&gt;
&lt;h2&gt;Using Reflection&lt;/h2&gt;As you can see bindings can creating using Reflection. &lt;br /&gt;Also supported open generic types:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (IRepository&amp;lt;&amp;gt;)).To(&lt;span style="color:Blue;"&gt;typeof&lt;/span&gt; (Repository&amp;lt;&amp;gt;));
injector.Get&amp;lt;IRepository&amp;lt;Alfa&amp;gt;&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;container supported self bindable types, if you are write this code, it will be correct:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Get&amp;lt;Alfa&amp;gt;();
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using method delegate&lt;/h2&gt;MugenInjector can accept a delegate to be used as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().ToMethod(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.CallInjector.Get&amp;lt;A&amp;gt;()));
&lt;/pre&gt;&lt;/div&gt;For generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; T MethodBindingDelegate&amp;lt;&lt;span style="color:Blue;"&gt;out&lt;/span&gt; T&amp;gt;(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;For non-generic binding the delegate is as follows:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;public&lt;/span&gt; &lt;span style="color:Blue;"&gt;delegate&lt;/span&gt; &lt;span style="color:Blue;"&gt;object&lt;/span&gt; MethodBindingDelegate(IBindingContext bindingContext);
&lt;/pre&gt;&lt;/div&gt;It takes &lt;b&gt;IBindingContext&lt;/b&gt; and returns an instance of service, more about &lt;b&gt;IBindingContext&lt;/b&gt; see this.&lt;br /&gt;
&lt;h2&gt;Using Constant&lt;/h2&gt;MugenInjector can accept a ready-made instance as a service creator:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;Alfa&amp;gt;().ToConstant(&lt;span style="color:Blue;"&gt;new&lt;/span&gt; Alfa());
&lt;/pre&gt;&lt;/div&gt;
&lt;h2&gt;Using Expressions (only expression supported platforms)&lt;/h2&gt;MugenInjector can accept a lambda expression to be used for creating binding:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;var&lt;/span&gt; injector = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;B&amp;gt;().To(context =&amp;gt; &lt;span style="color:Blue;"&gt;new&lt;/span&gt; B(context.Resolve&amp;lt;A&amp;gt;()) {C = &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C()});
&lt;/pre&gt;&lt;/div&gt;This code is equivalent to:&lt;br /&gt;&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
injector.Bind&amp;lt;B&amp;gt;().ToSelf().TakeConstructor&amp;lt;A&amp;gt;().WithPropertyValue&amp;lt;C&amp;gt;(&lt;span style="color:#A31515;"&gt;&amp;quot;C&amp;quot;&lt;/span&gt;, &lt;span style="color:Blue;"&gt;new&lt;/span&gt; C());
&lt;/pre&gt;&lt;/div&gt;The expression not used for create service, it&amp;#39;s used only for create binding.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Almost all methods described above have different overload.&lt;/i&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 11:05:03 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Registrating bindings 20120812110503A</guid></item><item><title>Updated Wiki: Registrating bindings</title><link>http://mugeninjection.codeplex.com/wikipage?title=Registrating bindings&amp;version=1</link><description>&lt;div class="wikidoc"&gt;Bindings are registered with &lt;b&gt;IInjectorBinder&lt;/b&gt;.&lt;br /&gt;Bindings can be created using lambda expressions, by reflection, or by providing a ready-made instance.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 07:55:05 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Registrating bindings 20120812075505A</guid></item><item><title>Updated Wiki: Mugen Injection</title><link>http://mugeninjection.codeplex.com/wikipage?title=Mugen Injection&amp;version=1</link><description>&lt;div class="wikidoc"&gt;1&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Sun, 12 Aug 2012 05:32:01 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Mugen Injection 20120812053201A</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=18</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
A lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property, field, and method call injection. See
&lt;a title="Documentation" href="http://mugeninjection.codeplex.com/documentation" target="_self"&gt;
documentation&lt;/a&gt; and &lt;a title="example" href="http://mugeninjection.codeplex.com/releases/view/92487" target="_self"&gt;
example&lt;/a&gt;&amp;nbsp;for more detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NET 2.0 - 4.5.&amp;nbsp; &lt;/li&gt;&lt;li&gt;WinRT &lt;/li&gt;&lt;li&gt;Silverlight 3-5 &lt;/li&gt;&lt;li&gt;Windows phone 7-7.1&amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported MVC 2 - 4 &amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported WCF &lt;/li&gt;&lt;li&gt;Supported NServiceBus.ObjectBuilder &lt;/li&gt;&lt;li&gt;Supports private protected internal injection in Silverlight(4-5). &lt;/li&gt;&lt;li&gt;Supports interceptors. &lt;/li&gt;&lt;li&gt;Easy integration with libraries for logging(Log4Net, NLog2). &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Available in nuget&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color:#202020; border:4px solid #C0C0C0; color:#e2e2e2; display:block; font:1.5em/1.5em 'andale mono','lucida console',monospace; overflow:auto; padding:15px"&gt;
PM&amp;gt; Install-Package MugenInjection&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Thu, 09 Aug 2012 16:23:50 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120809042350P</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=17</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
A lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property, field, and method call injection. See
&lt;a title="Documentation" href="http://mugeninjection.codeplex.com/documentation" target="_self"&gt;
documentation&lt;/a&gt; and &lt;a title="example" href="http://mugeninjection.codeplex.com/releases/view/91284" target="_self"&gt;
example&lt;/a&gt;&amp;nbsp;for more detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NET 2.0 - 4.5.&amp;nbsp; &lt;/li&gt;&lt;li&gt;WinRT &lt;/li&gt;&lt;li&gt;Silverlight 3-5 &lt;/li&gt;&lt;li&gt;Windows phone 7-7.1&amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported MVC 2 - 4 &amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported WCF &lt;/li&gt;&lt;li&gt;Supported NServiceBus.ObjectBuilder &lt;/li&gt;&lt;li&gt;Supports private protected internal injection in Silverlight(4-5). &lt;/li&gt;&lt;li&gt;Supports interceptors. &lt;/li&gt;&lt;li&gt;Easy integration with libraries for logging(Log4Net, NLog2). &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Available in nuget&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color:#202020; border:4px solid #C0C0C0; color:#e2e2e2; display:block; font:1.5em/1.5em 'andale mono','lucida console',monospace; overflow:auto; padding:15px"&gt;
PM&amp;gt; Install-Package MugenInjection&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Tue, 17 Jul 2012 14:34:46 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120717023446P</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=16</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
A lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property, field, and method call injection. See
&lt;a title="Documentation" href="http://mugeninjection.codeplex.com/documentation" target="_self"&gt;
documentation&lt;/a&gt; and &lt;a title="example" href="http://mugeninjection.codeplex.com/releases/view/87812" target="_self"&gt;
example&lt;/a&gt;&amp;nbsp;for more detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NET 2.0 - 4.5.&amp;nbsp; &lt;/li&gt;&lt;li&gt;WinRT &lt;/li&gt;&lt;li&gt;Silverlight 3-5 &lt;/li&gt;&lt;li&gt;Windows phone 7-7.1&amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported MVC 2 - 4 &amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported WCF &lt;/li&gt;&lt;li&gt;Supported NServiceBus.ObjectBuilder &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Available in nuget&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color:#202020; border:4px solid #C0C0C0; color:#e2e2e2; display:block; font:1.5em/1.5em 'andale mono','lucida console',monospace; overflow:auto; padding:15px"&gt;
PM&amp;gt; Install-Package MugenInjection&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Fri, 29 Jun 2012 04:00:35 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120629040035A</guid></item><item><title>Updated Wiki: Home</title><link>http://mugeninjection.codeplex.com/wikipage?version=15</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
A lightweight and fast managed IoC (Inversion of Control) and DI (Dependency Injection) with support for constructor, property, field, and method call injection. See
&lt;a title="Documentation" href="http://mugeninjection.codeplex.com/documentation" target="_self"&gt;
documentation&lt;/a&gt; and &lt;a title="example" href="http://mugeninjection.codeplex.com/releases/view/85574" target="_self"&gt;
example&lt;/a&gt;&amp;nbsp;for more detail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NET 2.0 - 4.5.&amp;nbsp; &lt;/li&gt;&lt;li&gt;WinRT &lt;/li&gt;&lt;li&gt;Silverlight 3-5 &lt;/li&gt;&lt;li&gt;Windows phone 7-7.1&amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported MVC 2 - 4 &amp;nbsp; &lt;/li&gt;&lt;li&gt;Supported WCF &lt;/li&gt;&lt;li&gt;Supported NServiceBus.ObjectBuilder &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Available in nuget&lt;/strong&gt;&lt;/p&gt;
&lt;p style="background-color:#202020; border:4px solid #C0C0C0; color:#e2e2e2; display:block; font:1.5em/1.5em 'andale mono','lucida console',monospace; overflow:auto; padding:15px"&gt;
PM&amp;gt; Install-Package MugenInjection&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Wed, 09 May 2012 15:15:38 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20120509031538P</guid></item><item><title>Updated Wiki: WCF</title><link>http://mugeninjection.codeplex.com/wikipage?title=WCF&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;To use the container in WCF you need to add code to your Global.asax.cs file:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;    &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; Global : MugenInjectionHttpApplication
    {
        &lt;span style="color:blue"&gt;#region&lt;/span&gt; Overrides of MugenInjectionHttpApplication

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Creates the injector that will manage your application.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; The created injector.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; IInjector CreateInjector()
        {
            &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;ISimpleInjectedService&amp;gt;()
                .To&amp;lt;SingletonInjectedService&amp;gt;()
                .WhenInto&amp;lt;SingletonService&amp;gt;();

            injector.Bind&amp;lt;ISimpleInjectedService&amp;gt;()
                .To&amp;lt;SimpleInjectedService&amp;gt;()
                .WhenInto&amp;lt;SimpleService&amp;gt;()
                .InOperationRequestScope();

            &lt;span style="color:blue"&gt;return&lt;/span&gt; injector;
        }

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Configure current &amp;lt;see cref=&amp;quot;T:MugenInjection.Web.MugenInjectionHttpApplication&amp;quot;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;applicationConfiguration&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;Configuration instance.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; Configure(IApplicationConfiguration applicationConfiguration)
        {
            &lt;span style="color:green"&gt;//This is important.&lt;/span&gt;
            applicationConfiguration
                .WithWcfConfiguration();

            &lt;span style="color:green"&gt;//You can add your IServiceBehavior and IDispatchMessageInspector&lt;/span&gt;
            applicationConfiguration.WithDispatchMessageInspector(&lt;span style="color:blue"&gt;new&lt;/span&gt; CustomDispatchMessageInspector());
            applicationConfiguration.WithServiceBehavior(&lt;span style="color:blue"&gt;new&lt;/span&gt; CustomServiceBehavior());

            &lt;span style="color:green"&gt;//You can create custom behavior for release service instance, default used dispose behavior.&lt;/span&gt;

            &lt;span style="color:green"&gt;/*applicationConfiguration.WithReleaseInstanceBehavior(new CustomeReleaseInstanceBehavior());*/&lt;/span&gt;
        }

        &lt;span style="color:blue"&gt;#endregion&lt;/span&gt;
    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;If you&amp;rsquo;re hosting in IIS, you&amp;rsquo;ll need to reference this ServiceHostFactory in your .svc file:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&amp;lt;%@ ServiceHost Language=&amp;quot;C#&amp;quot; Debug=&amp;quot;true&amp;quot; 
    Service=&amp;quot;TestMugenInjectorWcf.Service1&amp;quot; 
    CodeBehind=&amp;quot;Service1.svc.cs&amp;quot;  
    Factory=&amp;quot;MugenInjection.Wcf.MugenInjectionServiceHostFactory&amp;quot; %&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;or, if you&amp;rsquo;re using .Net 4.0 and taking advantage of the new file-less activation, reference the ServiceHostFactory in your web.config like so:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:green"&gt;&amp;lt;!-- Using configuration based activation so we don't need to have .svc files --&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;serviceActivations&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt; &lt;span style="color:red"&gt;factory&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjection.Wcf.MugenInjectionServiceHostFactory&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;
     &lt;span style="color:red"&gt;service&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;TestMugenInjectorWcf.Service1&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;
     &lt;span style="color:red"&gt;relativeAddress&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;Service1.svc&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;serviceActivations&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;In the WCF application is available one additional LifecycleScope,&amp;nbsp;&lt;strong&gt;OperationRequestScope&lt;/strong&gt;&lt;/span&gt;&lt;span&gt;. More about LifecycleScope&amp;nbsp;&lt;/span&gt;&lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Lifecycle%20scope&amp;referringTitle=Documentation"&gt;here&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can add your IServiceBehavior and IDispatchMessageInspector,&amp;nbsp;&lt;span&gt;&amp;nbsp;for this you must add:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;  applicationConfiguration.WithDispatchMessageInspector(&lt;span style="color:blue"&gt;new&lt;/span&gt; CustomDispatchMessageInspector());
  applicationConfiguration.WithServiceBehavior(&lt;span style="color:blue"&gt;new&lt;/span&gt; CustomServiceBehavior());&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Also you can create custom behavior for release service instance, default used dispose behavior:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;applicationConfiguration.WithReleaseInstanceBehavior(&lt;span style="color:blue"&gt;new&lt;/span&gt; CustomReleaseInstanceBehavior());
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Mon, 07 May 2012 14:35:25 GMT</pubDate><guid isPermaLink="false">Updated Wiki: WCF 20120507023525P</guid></item><item><title>Updated Wiki: MVC</title><link>http://mugeninjection.codeplex.com/wikipage?title=MVC&amp;version=7</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;To use the container in MVC you need to add code to your Global.asax.cs file:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; MvcApplication : MugenInjectionHttpApplication
    {
        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(&lt;span style="color:blue"&gt;new&lt;/span&gt; HandleErrorAttribute());
        }

        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute(&lt;span style="color:#a31515"&gt;&amp;quot;{resource}.axd/{*pathInfo}&amp;quot;&lt;/span&gt;);

            routes.MapRoute(
                &lt;span style="color:#a31515"&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;, &lt;span style="color:green"&gt;// Route name&lt;/span&gt;
                &lt;span style="color:#a31515"&gt;&amp;quot;{controller}/{action}/{id}&amp;quot;&lt;/span&gt;, &lt;span style="color:green"&gt;// URL with parameters&lt;/span&gt;
                &lt;span style="color:blue"&gt;new&lt;/span&gt; {controller = &lt;span style="color:#a31515"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;, action = &lt;span style="color:#a31515"&gt;&amp;quot;Index&amp;quot;&lt;/span&gt;, id = UrlParameter.Optional} &lt;span style="color:green"&gt;// Parameter defaults&lt;/span&gt;
                );
        }

        &lt;span style="color:blue"&gt;#region&lt;/span&gt; Overrides of MugenInjectionHttpApplication

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Called when the application is started.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; OnApplicationStarted()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Creates the injector that will manage your application.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; The created injector.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; IInjector CreateInjector()
        {
            &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;IRequestScopeService&amp;gt;()
                .To&amp;lt;RequestScopeService&amp;gt;()
                .InHttpRequestScope();

            injector.Bind&amp;lt;ISessionScopeService&amp;gt;()
                .To&amp;lt;SessionScopeService&amp;gt;()
                .InSessionScope();

            &lt;span style="color:blue"&gt;return&lt;/span&gt; injector;
        }

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Configure current &amp;lt;see cref=&amp;quot;T:MugenInjection.Web.MugenInjectionHttpApplication&amp;quot;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;applicationConfiguration&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;Configuration instance.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; Configure(IApplicationConfiguration applicationConfiguration)
        {
            &lt;span style="color:green"&gt;//This is important.&lt;/span&gt;
            applicationConfiguration
                .WithHttpConfiguration()
                .WithMvcConfiguration();
        }

        &lt;span style="color:blue"&gt;#endregion&lt;/span&gt;
    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;In the http application is available two additional LifecycleScope, &lt;strong&gt;HttpRequestScope&lt;/strong&gt; and
&lt;strong&gt;SessionScope&lt;/strong&gt;. More about LifecycleScope &lt;a href="http://mugeninjection.codeplex.com/wikipage?title=Lifecycle%20scope&amp;referringTitle=Documentation"&gt;
here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also use &lt;strong&gt;RoleProvider&lt;/strong&gt; and &lt;strong&gt;MembershipProvider&lt;/strong&gt;, with custom injections, for this you must add in web.config:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre style="color:black"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;membership&lt;/span&gt; &lt;span style="color:red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;clear&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjection.Web.Mvc.Providers.MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;  &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;membership&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;roleManager&lt;/span&gt; &lt;span style="color:red"&gt;enabled&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;clear&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjection.Web.Mvc.Providers.MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;       
      &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
 &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;roleManager&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Then in your code, you must implement to RoleProvider and MembershipProvider:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Creates the injector that will manage your application.&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; The created injector.&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; IInjector CreateInjector()
{
     &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
     injector.Bind&amp;lt;IService&amp;gt;().To&amp;lt;CustomService&amp;gt;();

     &lt;span style="color:green"&gt;//Register providers&lt;/span&gt;
     injector.WithCustomMembershipProvider&amp;lt;MemberProvider&amp;gt;();
     injector.WithCustomRoleProvider&amp;lt;CustomRoleProvider&amp;gt;();

      &lt;span style="color:blue"&gt;return&lt;/span&gt; injector;
}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Mon, 07 May 2012 14:20:19 GMT</pubDate><guid isPermaLink="false">Updated Wiki: MVC 20120507022019P</guid></item><item><title>Updated Wiki: Lifecycle scope</title><link>http://mugeninjection.codeplex.com/wikipage?title=Lifecycle scope&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;At this point, the container supports four lifecycle scope, but you can add your own implementation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SingletonScopeLifecycle -&lt;/strong&gt;&amp;nbsp;indicates that only a single instance of the binding should be created, and then should be re-used for all subsequent requests.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;ITest&amp;gt;().To&amp;lt;Test&amp;gt;().InSingletonScope();

&lt;span style="color:blue"&gt;var&lt;/span&gt; test = injector.Get&amp;lt;ITest&amp;gt;();
&lt;span style="color:blue"&gt;var&lt;/span&gt; test1 = injector.Get&amp;lt;ITest&amp;gt;();
&lt;span style="color:blue"&gt;if&lt;/span&gt; (test == test1)
    Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Is always true.&amp;quot;&lt;/span&gt;);

IInjector child = injector.CreateChild();
&lt;span style="color:blue"&gt;var&lt;/span&gt; test2 = child.Get&amp;lt;ITest&amp;gt;();
&lt;span style="color:blue"&gt;if&lt;/span&gt; (test == test2)
    Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;ThreadScopeLifecycle&lt;/strong&gt;&amp;nbsp;- indicates that instances activated via the binding should be re-used within the same thread.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;            var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;ITest&amp;gt;().To&amp;lt;Test&amp;gt;().InThreadScope();

            &lt;span style="color:blue"&gt;var&lt;/span&gt; test = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test1 = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test == test1)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Is always true.&amp;quot;&lt;/span&gt;);

            &lt;span style="color:blue"&gt;var&lt;/span&gt; thread = &lt;span style="color:blue"&gt;new&lt;/span&gt; Thread(() =&amp;gt;
                                        {
                                            test1 = injector.Get&amp;lt;ITest&amp;gt;();
                                            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test != test1)
                                                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Is always true.&amp;quot;&lt;/span&gt;);
                                        });
            thread.Start();

            IInjector child = injector.CreateChild();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test2 = child.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test == test2)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);

            thread = &lt;span style="color:blue"&gt;new&lt;/span&gt; Thread(() =&amp;gt;
                                    {
                                        test1 = child.Get&amp;lt;ITest&amp;gt;();
                                        &lt;span style="color:blue"&gt;if&lt;/span&gt; (test != test1)
                                            Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);
                                    });
            thread.Start();&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;TransientScopeLifecycle&lt;/strong&gt;&amp;nbsp;- indicates that instances activated via the binding should not be re-used, nor have their lifecycle managed.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;ITest&amp;gt;().To&amp;lt;Test&amp;gt;().InTransientScope();

            &lt;span style="color:blue"&gt;var&lt;/span&gt; test = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test1 = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test != test1)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Is always true.&amp;quot;&lt;/span&gt;);

            IInjector child = injector.CreateChild();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test2 = child.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test != test2)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test1 != test2)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;UnitOfWorkScopeLifecycle&lt;/strong&gt;&amp;nbsp;-&amp;nbsp;indicates that only a single instance of the binding should be created in each IInjector, and then should be re-used for all subsequent requests.&amp;nbsp;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;            &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;ITest&amp;gt;().To&amp;lt;Test&amp;gt;().InUnitOfWorkScope();

            &lt;span style="color:blue"&gt;var&lt;/span&gt; test = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test1 = injector.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test == test1)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;Is always true.&amp;quot;&lt;/span&gt;);

            IInjector child = injector.CreateChild();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test2 = child.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;var&lt;/span&gt; test3 = child.Get&amp;lt;ITest&amp;gt;();
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test != test2)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (test2 == test3)
                Console.WriteLine(&lt;span style="color:#a31515"&gt;&amp;quot;And it is also true.&amp;quot;&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;An example of the creation and use of ScopeLifecycle.&amp;nbsp;We will create &lt;strong&gt;
WeakReferenceScopeLifecycle&lt;/strong&gt;.&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;    &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; WeakReferenceScopeLifecycle : ScopeLifecycleBase
    {
        &lt;span style="color:blue"&gt;#region&lt;/span&gt; Fields

        &lt;span style="color:blue"&gt;private&lt;/span&gt; WeakReference _weakReference;

        &lt;span style="color:blue"&gt;#endregion&lt;/span&gt;
        
        &lt;span style="color:blue"&gt;#region&lt;/span&gt; Overrides of ScopeLifecycleBase

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Get object from current scope.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns/&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;object&lt;/span&gt; GetObjectFromScope()
        {
            &lt;span style="color:blue"&gt;if&lt;/span&gt; (_weakReference == &lt;span style="color:blue"&gt;null&lt;/span&gt; || !_weakReference.IsAlive)
            {
                &lt;span style="color:blue"&gt;object&lt;/span&gt; service = &lt;span style="color:blue"&gt;this&lt;/span&gt;.ResolveCurrentService();
                _weakReference = &lt;span style="color:blue"&gt;new&lt;/span&gt; WeakReference(service);
                &lt;span style="color:blue"&gt;return&lt;/span&gt; service;
            }
            &lt;span style="color:blue"&gt;return&lt;/span&gt; _weakReference.Target;
        }

        &lt;span style="color:blue"&gt;#endregion&lt;/span&gt;
    }&lt;/pre&gt;
&lt;pre&gt;&lt;div style="color:black; background-color:white"&gt;&lt;pre&gt;&lt;span style="color:green"&gt;//Somewhere in code&lt;/span&gt;
&lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
injector.Bind&amp;lt;Test&amp;gt;().ToSelf().InScope(&lt;span style="color:blue"&gt;new&lt;/span&gt; WeakReferenceScopeLifecycle());&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Scopes only for HTTP application:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HttpRequestScope&lt;/strong&gt;&amp;nbsp;- indicates that instances activated via the binding should be re-used within the same HTTP request, for scope used HttpContext.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SessionScope&lt;/strong&gt;&amp;nbsp;- indicates that instances activated via the binding should be re-used within the same HTTP session, for scope used HttpSessionState.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OperationRequestScope&lt;/strong&gt;&amp;nbsp;- indicates that instances activated via the binding should be re-used within the same OperationContext request, for scope used OperationContext, used for WCF.&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Mon, 07 May 2012 14:19:02 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Lifecycle scope 20120507021902P</guid></item><item><title>Updated Wiki: MVC</title><link>http://mugeninjection.codeplex.com/wikipage?title=MVC&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;p&gt;To use the container in MVC you need to add code to your Global.asax.cs file:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; MvcApplication : MugenInjectionHttpApplication
    {
        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(&lt;span style="color:blue"&gt;new&lt;/span&gt; HandleErrorAttribute());
        }

        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;static&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute(&lt;span style="color:#a31515"&gt;&amp;quot;{resource}.axd/{*pathInfo}&amp;quot;&lt;/span&gt;);

            routes.MapRoute(
                &lt;span style="color:#a31515"&gt;&amp;quot;Default&amp;quot;&lt;/span&gt;, &lt;span style="color:green"&gt;// Route name&lt;/span&gt;
                &lt;span style="color:#a31515"&gt;&amp;quot;{controller}/{action}/{id}&amp;quot;&lt;/span&gt;, &lt;span style="color:green"&gt;// URL with parameters&lt;/span&gt;
                &lt;span style="color:blue"&gt;new&lt;/span&gt; {controller = &lt;span style="color:#a31515"&gt;&amp;quot;Home&amp;quot;&lt;/span&gt;, action = &lt;span style="color:#a31515"&gt;&amp;quot;Index&amp;quot;&lt;/span&gt;, id = UrlParameter.Optional} &lt;span style="color:green"&gt;// Parameter defaults&lt;/span&gt;
                );
        }

        &lt;span style="color:blue"&gt;#region&lt;/span&gt; Overrides of MugenInjectionHttpApplication

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Called when the application is started.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; OnApplicationStarted()
        {
            AreaRegistration.RegisterAllAreas();
            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
        }

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Creates the injector that will manage your application.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; The created injector.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; IInjector CreateInjector()
        {
            &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
            injector.Bind&amp;lt;IRequestScopeService&amp;gt;()
                .To&amp;lt;RequestScopeService&amp;gt;()
                .InHttpRequestScope();

            injector.Bind&amp;lt;ISessionScopeService&amp;gt;()
                .To&amp;lt;SessionScopeService&amp;gt;()
                .InSessionScope();

            &lt;span style="color:blue"&gt;return&lt;/span&gt; injector;
        }

        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Configure current &amp;lt;see cref=&amp;quot;T:MugenInjection.Web.MugenInjectionHttpApplication&amp;quot;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;applicationConfiguration&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;Configuration instance.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; Configure(IApplicationConfiguration applicationConfiguration)
        {
            &lt;span style="color:green"&gt;//This is important.&lt;/span&gt;
            applicationConfiguration
                .WithHttpConfiguration()
                .WithMvcConfiguration();
        }

        &lt;span style="color:blue"&gt;#endregion&lt;/span&gt;
    }&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;In the http application is available two additional LifecycleScope, &lt;strong&gt;HttpRequestScope&lt;/strong&gt; and
&lt;strong&gt;SessionScope&lt;/strong&gt;. More about LifecycleScope here.&lt;/p&gt;
&lt;p&gt;You can also use &lt;strong&gt;RoleProvider&lt;/strong&gt; and &lt;strong&gt;MembershipProvider&lt;/strong&gt;, with custom injections, for this you must add in web.config:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre style="color:black"&gt;&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;membership&lt;/span&gt; &lt;span style="color:red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;clear&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjection.Web.Mvc.Providers.MugenInjectionMembershipProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;  &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;membership&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;

&lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;roleManager&lt;/span&gt; &lt;span style="color:red"&gt;enabled&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;true&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;clear&lt;/span&gt;&lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515"&gt;add&lt;/span&gt; &lt;span style="color:red"&gt;name&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:red"&gt;type&lt;/span&gt;&lt;span style="color:blue"&gt;=&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color:blue"&gt;MugenInjection.Web.Mvc.Providers.MugenInjectionRoleProvider&lt;/span&gt;&lt;span style="color:black"&gt;&amp;quot;&lt;/span&gt; &lt;span style="color:blue"&gt;/&amp;gt;&lt;/span&gt;       
      &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;providers&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;
 &lt;span style="color:blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515"&gt;roleManager&lt;/span&gt;&lt;span style="color:blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Then in your code, you must implement to RoleProvider and MembershipProvider:&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Creates the injector that will manage your application.&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;returns&amp;gt;&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; The created injector.&lt;/span&gt;
&lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;
&lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; IInjector CreateInjector()
{
     &lt;span style="color:blue"&gt;var&lt;/span&gt; injector = &lt;span style="color:blue"&gt;new&lt;/span&gt; MugenInjector();
     injector.Bind&amp;lt;IService&amp;gt;().To&amp;lt;CustomService&amp;gt;();

     &lt;span style="color:green"&gt;//Register providers&lt;/span&gt;
     injector.WithCustomMembershipProvider&amp;lt;MemberProvider&amp;gt;();
     injector.WithCustomRoleProvider&amp;lt;CustomRoleProvider&amp;gt;();

      &lt;span style="color:blue"&gt;return&lt;/span&gt; injector;
}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>VVS0205</author><pubDate>Mon, 07 May 2012 14:12:17 GMT</pubDate><guid isPermaLink="false">Updated Wiki: MVC 20120507021217P</guid></item></channel></rss>