using IWcfClientFactory

111 views
Skip to first unread message

caswcf

unread,
Aug 27, 2012, 8:52:35 AM8/27/12
to castle-pro...@googlegroups.com
Can any one post an example on how to use  IWcfClientFactory 

Thanks

Craig Neuwirt

unread,
Aug 27, 2012, 3:20:46 PM8/27/12
to castle-pro...@googlegroups.com
The purpose of IWcfClientFactory is to avoid a dependency on the container.  Therefore, once injected into a component you can do the following

_clientFactory.GetClient<IMyService>(new Uri("http://localhost/MyService")) or pass an IWcfEndpointModel or IWcfClientModel for more detailed resolution


On Aug 27, 2012, at 7:52 AM, caswcf wrote:

Can any one post an example on how to use  IWcfClientFactory 

Thanks

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/eqGi_2JAt2EJ.
To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.

caswcf

unread,
Aug 27, 2012, 3:53:59 PM8/27/12
to castle-pro...@googlegroups.com
makes sense , how do you use usingfactorymethod to provide instance of wcf client proxy


On Monday, August 27, 2012 3:20:46 PM UTC-4, Craig Neuwirt wrote:
The purpose of IWcfClientFactory is to avoid a dependency on the container.  Therefore, once injected into a component you can do the following

_clientFactory.GetClient<IMyService>(new Uri("http://localhost/MyService")) or pass an IWcfEndpointModel or IWcfClientModel for more detailed resolution
On Aug 27, 2012, at 7:52 AM, caswcf wrote:

Can any one post an example on how to use  IWcfClientFactory 

Thanks

--
You received this message because you are subscribed to the Google Groups "Castle Project Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/castle-project-users/-/eqGi_2JAt2EJ.
To post to this group, send email to castle-pro...@googlegroups.com.

Craig Neuwirt

unread,
Aug 27, 2012, 4:10:15 PM8/27/12
to castle-pro...@googlegroups.com
If you have some other way to provide proxies, i imagine it would look like

Component.For<IMyService>().UsingFactoryMethod(k => k.Resolve<IProxyProviders>().GetProxy()));


To post to this group, send email to castle-pro...@googlegroups.com.
To unsubscribe from this group, send email to castle-project-u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages