Lilliput Lane Model – Round

Windsor Castle model

I use Windsor Castle quite a while now. It is just perfect for environments where data is located in a database or the like, where the repository pattern or the unitofwork pattern do work well.

Now I do have a different situation: I have a complex object model that is assembled by a lot of single PONOs. The environment is strongly influenced by COM, to make it more explicit: Excel, Word PIOs are heavily used.

I do use the command pattern, I implemented the ICommandHandler like described here but with one difference. As I do want to assembly commands to a list of commands to call them in a run without knowing anything beside the general command pattern described, it does not make to introduce the context when calling the execute method. So the interface does look like this:

public interface ICommand { void Execute; bool CanExecute; }

Execution of commands with that interface is effective and easy to understand. On the other hand it is a problem to introduce the context with the ctor because therefore the Container must be called explicitely to e.g. add ctor parameters.

So I actually have two questions:

  1. Is it possible to inject a - let's call it a context, a part of the object model - automatically by Windsor castle without calling the container explictely?
Source: stackoverflow.com
Video on topic: Windsor Castle model
The QE2 & Windsor Castle at Southampton Docks 1969
The QE2 & Windsor Castle at Southampton Docks 1969
Scrap Tours- RMS WINDSOR CASTLE at the Ship Breakers.
Scrap Tours- RMS WINDSOR CASTLE at the Ship Breakers.
Model Railways UK - G&R WRENN LTD - Windsor castle 4082
Model Railways UK - G&R WRENN LTD - Windsor castle 4082

Interesting facts
Share this Post

Related posts

Windsor Castle, Marylebone

Windsor Castle, Marylebone

NOVEMBER 25, 2020

Current user rating: 6.9/10 (rated by 87 users) other pubs nearby: please note - reviews on this site are purely the opinion…

Read More
Windsor Castle Chapel ST

Windsor Castle Chapel ST

NOVEMBER 25, 2020

The Windsor Castle Hotel is an improbable oasis away from the hectic pace of Chapel Street and, nestled behind the train…

Read More