c# 4.0 - Castle windsor wcf facility - add clients through config file -
i'm using castle windsor wcf facility self hosting services. on client side use wcf facility again consuming them. want register services @ client side dynamically looping getting operationcontracts , register them through code endpoint configuration config file.
most of examples saw on internet using code register them. cannot use client want more flexibility manipulating config file if , when needed. below code came fails read configuration of client endpoints config file.
container.register( classes .fromassemblycontaining<ixxx>() .pick() .if(x => x.isclass && hasservicecontract(x)) .configure(c => c.aswcfclient().lifestyle.perwcfoperation()));
please advise.
thanks in advance
sai
here's how i'm doing it:
container.register( component.for<isomeservice>() .aswcfclient(wcfendpoint.fromconfiguration("*")) );
the "*" wildcard endpoint name. specify named endpoint, using wildcard preferred way (it pick endpoint matching service interface).
please note lifestyle.perwcfoperation works server side components , cannot used on wcf client (well maybe can, guess won't anything).
Comments
Post a Comment