Hi Team, I have been using the StartableFacility during the registration of my service. My service is publicly registered as an interface, but the 'start' method belongs to the concrete type.
When I register like this: container.Register( Component.For<IQueryRemoteHandler>().ImplementedBy<ServerQueryRemotingHandler>() .StartUsingMethod(server => (server as ServerQueryRemotingHandler).Start) ); You see I have to cast my service before I can get to the 'start' method This suggestion is really just about usability: Shouldn't the generic type argument for the 'StartUsingMethod' be the 'ImplementedBy' type, not the 'For' type? The container knows the concrete type, so it should be able to pass that to the StartUsingMethod... not the interface What do you think? Adam Langley Senior Developer +64 9 486 9010 +64 21 884400 [email protected] www.winscribe.com Please consider the environment before printing this email! -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
