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.

Reply via email to