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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -