<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>IoC on Bryan Avery</title><link>https://bryanavery.co.uk/categories/ioc/</link><description>Recent content in IoC on Bryan Avery</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><copyright>© 2026 Bryan Avery.</copyright><lastBuildDate>Wed, 30 Nov 2016 16:22:37 +0000</lastBuildDate><atom:link href="https://bryanavery.co.uk/categories/ioc/index.xml" rel="self" type="application/rss+xml"/><item><title>IoC Benchmark</title><link>https://bryanavery.co.uk/ioc-benchmark/</link><pubDate>Wed, 30 Nov 2016 16:22:37 +0000</pubDate><guid>https://bryanavery.co.uk/ioc-benchmark/</guid><description>&lt;p&gt;So which is the fastest at different IoC Lifestyles.&lt;/p&gt;&#10;&lt;p&gt;In this benchmark we will be running, head to had, with Castle Windsor, Ninject, Spring.NET, Unity, Microsoft DI, AutoFac, and Structure Map.&lt;/p&gt;&#10;&lt;p&gt;Here is a working project, this uses NuGet to included the packages, so as time goes on you may find the packages go out of date, so you’ll need to refactor the code to work with the next packages.&lt;/p&gt;</description></item><item><title>Factory Support Facility</title><link>https://bryanavery.co.uk/factory-support-facility/</link><pubDate>Mon, 28 Nov 2016 13:40:47 +0000</pubDate><guid>https://bryanavery.co.uk/factory-support-facility/</guid><description>&lt;p&gt;Factory Support Facility allows using factories to create components. This is beneficial when you want to make available as services components that do not have accessible constructor, or that you don’t instantiate, like HttpContext.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Prefer UsingFactoryMethod over this facility:&lt;/strong&gt; while the facility provides programmatic API it is deprecated and its usage is discouraged and won’t be discussed here. Recommended approach is to use &lt;a href="https://github.com/castleproject/Windsor/blob/master/docs/registering-components-one-by-one.md#using-a-delegate-as-component-factory"&gt;&lt;span style="color: #3366ff;"&gt;UsingFactoryMethod&lt;/span&gt;&lt;/a&gt; method of&lt;a href="https://github.com/castleproject/Windsor/blob/master/docs/fluent-registration-api.md"&gt;&lt;span style="color: #3366ff;"&gt; fluent registration API&lt;/span&gt;&lt;/a&gt; to create components. This limits the usefulness of the facility to XML-driven and legacy scenarios.&lt;/p&gt;</description></item><item><title>Registering components for IoC</title><link>https://bryanavery.co.uk/registering-components-for-ioc/</link><pubDate>Mon, 28 Nov 2016 13:32:45 +0000</pubDate><guid>https://bryanavery.co.uk/registering-components-for-ioc/</guid><description>&lt;p&gt;Inversion of Control (IoC) is quite a big step for some developers, but the benefits once implemented are huge.  With the applications performance, maintainability, unit testing and more importantly separation of concerns, just to name a few.&lt;/p&gt;</description></item><item><title>Lifestyles of the Castle Windsor IoC Containers</title><link>https://bryanavery.co.uk/lifestyles-of-the-castle-windsor-ioc-containers/</link><pubDate>Thu, 01 Apr 2010 14:12:00 +0000</pubDate><guid>https://bryanavery.co.uk/lifestyles-of-the-castle-windsor-ioc-containers/</guid><description>&lt;p&gt;It’s worth knowing how the Castle Windsor IoC work, by default it uses Singletons, where this will work for the most of the time, there are a lot more options available to you depending on your needs.  These lifestyles that are available in Castle Windsor are:&lt;/p&gt;</description></item><item><title>Introduction to Dependency Injection</title><link>https://bryanavery.co.uk/introduction-to-dependency-injection/</link><pubDate>Thu, 01 Apr 2010 09:00:00 +0000</pubDate><guid>https://bryanavery.co.uk/introduction-to-dependency-injection/</guid><description>&lt;p&gt;Dependency Injection (DI) is an incredibly useful and easy technique which makes your code a lot easier to test.&lt;/p&gt;&#10;&lt;p&gt;I like to use samples to explain Dependency Injection. We’ll use a SqlMetaDataProvider class which needs to provide the meta data coming from a SQL Server database. It retrieves the meta data from the database in a relational structure (a DataSet) and then converts it to an easy to use object model. Obviously, i want to be able to test this class without actually going to the database because that would make the tests slow. So how can we test if the relational data is being converted to the object model without going to the database?&lt;/p&gt;</description></item><item><title>StructureMap Example</title><link>https://bryanavery.co.uk/structuremap-example/</link><pubDate>Thu, 22 Jan 2009 11:47:00 +0000</pubDate><guid>https://bryanavery.co.uk/structuremap-example/</guid><description>&lt;p&gt;After using StructureMap for a while I thought it would be nice to generate a simple example of how it all works, so I’ve built in Visual Studio 2008, both C# and a VB.NET version.&lt;/p&gt;</description></item></channel></rss>