Great, that looks perfect.

Thanks,
Adam

> On 17 Jul 2014, at 18:37, hammett <[email protected]> wrote:
> 
> Your interceptor can implement IOnBehalfAware to gain access to the
> component model of the thing being intercepted.
> 
> http://docs.castleproject.org/(S(yi1x3tbkipe21z2bdgklddnj))/Windsor.Interceptors.ashx
> 
> Hope this helps
> 
>> On Thu, Jul 17, 2014 at 10:08 AM, Adam Connelly <[email protected]> wrote:
>> Hi,
>> 
>> I'm experimenting with writing a new facility for windsor, and I've got it
>> working to a certain extent. The facility basically adds an interceptor to
>> interfaces to access config settings.
>> 
>> One thing I want to do is support computed properties, where there would be
>> a user supplied Func that provides the implementation. So I want to be able
>> to write something like:
>> 
>> container.Register(Component.For<ITestConfig>().FromAppConfig(
>>                o => o.Computed(c => c.ComputedSetting, c => c.StringSetting
>> + ":" + c.IntSetting)));
>> 
>> Where FromAppConfig is the following extension method:
>> 
>> public static ComponentRegistration<T> FromAppConfig<T>(this
>> ComponentRegistration<T> registration,
>>            Action<IConfigConfiguration<T>> configAction = null)
>>            where T : class
>>        {
>>            registration.Interceptors<AppConfigInterceptor>();
>> 
>>            return registration;
>>        }
>> 
>> What I'd like to do there is process the optional configAction parameter,
>> and pass the results as an argument to the instance of the interceptor
>> that's going to be used, or store the information somewhere else if
>> necessary.
>> 
>> Does anyone know if what I want to do is possible, and if not are there any
>> alternatives I can look at?
>> 
>> Cheers,
>> Adam
>> 
>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Cheers,
> hammett
> http://www.d-collab.com/
> http://www.hammettblog.com/
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to