Archive for category IoC

Strategy Pattern with Castle Windsor

One of the tangent patterns associated with isolation or Single Responsibility is the Strategy Pattern.  I use Castle Windsor as my IoC of choice and I had hoped there was some black magic built in to make the Strategy Pattern dead simple.  Turns out there is and there isn’t. What is the Strategy Pattern The [...]

Registering WPF “Views” with Windsor Fluent API

I’ve had this nagging issue for some time now with WPF views that are registered for an interface.  The Views themselves are WPF UserControls: namespace SomeApp.Views { public partial class SearchView : UserControl, ISearchView { public SearchView() { InitializeComponent(); } private void InitializeComponent() { throw new NotImplementedException(); } } }   I would love to [...]