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 video

Windsor Castle video

APRIL 27, 2024

Here’s one of my favourite activities to get students interested in Windsor Castle. The lesson is based around the ‘visit…

Read More
RMS Windsor Castle

RMS Windsor Castle

APRIL 27, 2024

History Name: RMS Windsor Castle Owner: Union-Castle Mail Steamship Company Port of registry: Route: Southampton-Las Palmas-Cape…

Read More