{"id":88,"date":"2010-10-14T07:56:11","date_gmt":"2010-10-14T05:56:11","guid":{"rendered":"http:\/\/www.gerst-it.com\/blog\/?p=88"},"modified":"2010-12-30T11:50:35","modified_gmt":"2010-12-30T09:50:35","slug":"unitity-container-nutzliches-aufrufe","status":"publish","type":"post","link":"https:\/\/blog.gerst-it.com\/?p=88","title":{"rendered":"Unitity Container &#8211; N\u00fctzliches Aufrufe"},"content":{"rendered":"<p><strong>1.<\/strong> Constructor Injection f\u00fcr die Auswahl eines bestimmten Constructor bei Multiple Choice<br \/>\n<code><em>Container.RegisterType(typeof(ISerializationManager&lt;&gt;), typeof(SerializationManager&lt;&gt;), new InjectionConstructor());<\/em><\/code><\/p>\n<p><strong>2.<\/strong> Single Pattern Aufruf einer Factory<br \/>\n<code><em>Container.RegisterType&lt;ISession&gt;(new InjectionFactory(c =&gt; SessionFactory.Instance.OpenSession()));<\/em><\/code><\/p>\n<p><strong>3.<\/strong> Parameter\u00fcbergabe bei Constructor Injection<br \/>\n<code><em>var dependencyInjection = new DependencyOverride&lt;INHibSession&gt;(container.Resolve&lt;INHibSession&gt;());<\/em><br \/>\n<em>_repository = container.Resolve&lt;IRepository&lt;Entity&gt;&gt;(dependencyInjection);<\/em><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Constructor Injection f\u00fcr die Auswahl eines bestimmten Constructor bei Multiple Choice Container.RegisterType(typeof(ISerializationManager&lt;&gt;), typeof(SerializationManager&lt;&gt;), new InjectionConstructor()); 2. Single Pattern Aufruf einer Factory Container.RegisterType&lt;ISession&gt;(new InjectionFactory(c =&gt; SessionFactory.Instance.OpenSession())); 3. Parameter\u00fcbergabe bei Constructor Injection var dependencyInjection = new DependencyOverride&lt;INHibSession&gt;(container.Resolve&lt;INHibSession&gt;()); _repository = container.Resolve&lt;IRepository&lt;Entity&gt;&gt;(dependencyInjection);<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-net"],"_links":{"self":[{"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":7,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions\/90"}],"wp:attachment":[{"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gerst-it.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}