c# - Castle Windsor Wcf Facility: How to inject WcfService-Instance into other components -
given following code:
public interface isomeservice() {...} public class someservice: isomeservice {...} public class consumer() { public consumer(isomeservice service) {...} }
i serve 1 instance of someservice wcf service , inject that same instance consumer classes. here's registration:
container.register( component.for<isomeservice>().implementedby<someservice>().aswcfservice(...).lifestylesingleton(), component.for<consumer>() );
now when resolving consumer, i'll receive different instance of someservice 1 being served wcfservice, though specified singleton lifestyle explicitely. can done wcffacility somehow? if not, create instance myself , publish using facility's internal features automagic channel recreation in case of faults?
Comments
Post a Comment