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
Comments are closed.
Navigation
Archive
<July 2008>
SunMonTueWedThuFriSat
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789
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)