I'd like to have no ISecurityProvider component registered unless I
register it explicitly.
I've already implemented deferred registration (component listens for
heartbeats from server, discovers service instances and registers clients
for each discovered instance. Actually it also provides balancing proxy to
all components dependent on service contract), but after I updated to
latest wcf facility version that introduces implicit registration feature
all this stuff stopped working since facility injects non functional proxy
(there is no configuration in app.config)
The following change of WcfFacility will solve all my problems:
public bool DoNotRegisterComponentsImplicitly{get;set;}
protected override void Init()
{
...
if(!DoNotRegisterComponentsImplicitly)
Component.For<ILazyComponentLoader>().ImplementedBy<WcfClientComponentLoader>()
}
Usage:
container.AddFacility<WcfFacility>(f=>f.DoNotRegisterComponentsImplicitly=true);
On Monday, April 1, 2013 3:46:12 PM UTC+4, Craig Neuwirt wrote:
>
> So what would you want to happen when you call
> container.Resolve<ISecurityProvider>()? We could possibly introduce some
> kind of DynamicWcfClientModel to defer or delay selection of the
> WcfClientModel.
>
>
> On Sun, Mar 31, 2013 at 3:22 PM, Konstantin
> <[email protected]<javascript:>
> > wrote:
>
>> lets say I have some service contract
>>
>> [ServiceContract]
>> public interface ISecurityProvider
>> {
>> [OperationContract]
>> void DoSomething();
>> }
>>
>>
>> following code throws
>> exception: Castle.MicroKernel.Facilities.FacilityException : The client
>> model requires an endpoint.
>>
>> WindsorContainer container=new WindsorContainer();
>> container.AddFacility<WcfFacility>();
>> var p=container.Resolve<ISecurityProvider>();
>>
>> It is convinient when WCF is configured in app.config. In my case app
>> listens topic in messageing to get the address where and how to access
>> service. So when container is initially configured service contracts should
>> not be resolvable.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Castle Project Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to
>> [email protected]<javascript:>
>> .
>> Visit this group at
>> http://groups.google.com/group/castle-project-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.