I think it does work OOTB without you having to register anything explicitly.

If you resolve a type for which there's an entry in the config file WCF Facility will register it automatically with the information from the config via a ILazyComponentLoader.

So all you do is:

var container = new WindsorContainer()
              .AddFacility<WcfFacility>();

var foo = container.Resolve<IFooService>();

foo.Bar("this should work if there's a config entry");


HTH,
Krzysztof



On 07/06/2011 10:40 PM, Stefan Sedich wrote:
Yeah exactly, is that possible ootb?

Regards
Stefan Sedich

Readify | Senior Developer
M: +61 434 250 747 | E: [email protected]

On 08/06/2011, at 5:00 AM, Craig Neuwirt<[email protected]>  wrote:

So you want to make the endpointName optional and default to the name of the 
contract?

On Jun 7, 2011, at 9:22 AM, codemonkey wrote:

I am registering a client like so:

var container = new WindsorContainer()
               .AddFacility<WcfFacility>()
               .Register(
                   Component.For<IFooService>()
                       .AsWcfClient(
                           DefaultClientModel.On(

WcfEndpoint.ForContract<IFooService>().FromConfiguration("IFooService")
                               )
                       )
               );

Is there a way to avoid using the .FromConfiguration("") and make it
pick up my config without the magic string, the config is like:

   <client>
     <endpoint name="IFooService" address="..." binding="..."
bindingConfiguration="..." contract="IFooService"
behaviorConfiguration="..."/>
   </client>



Thanks

--
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.

--
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.


--
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.

Reply via email to