Sometimes the appropriate response to reality is to go insane - Philip K Dick RSS 2.0
 Thursday, March 20, 2008

I've done it before, but my mind went totally blank yesterday ... due to some typically quick responses from the Castle Users Google Group ... here is the code to do it for future generations to avoid my same silly mistakes ...

WindsorContainer container = new WindsorContainer(); 
Type eventBrokerServiceType = typeof(IEventBroker<>); 
Type brokerType = typeof(EventBroker<>); 
container.AddComponent("key", eventBrokerServiceType, brokerType); 

IEventBroker<EventArgs> eventBroker = container.Resolve<IEventBroker<EventArgs>>(); 
Assert.IsNotNull(eventBroker); 


Thursday, March 20, 2008 9:44:12 AM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
alt.net | C# | Castle | Sample Code
Navigation
Archive
<March 2008>
SunMonTueWedThuFriSat
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008
Casey Charlton
Sign In
Statistics
Total Posts: 41
This Year: 13
This Month: 0
This Week: 0
Comments: 27
Themes
Pick a theme:
All Content © 2008, Casey Charlton
DasBlog theme 'Business' created by Christoph De Baene (delarou)