These look like data containers, so they wouldn't make good components.
They're given as configuration to 'real' components, right? In that case you
could use a custom type converter (see
http://www.castleproject.org/container/documentation/v21/usersguide/typeconverters.html
 , http://mikehadlow.blogspot.com/2010/02/10-advanced-windsor-tricks-10.html ).
In your custom converter you'd read the filename specified in the Windsor
config, deserialize the config and return it.

--
Mauricio



On Tue, May 24, 2011 at 3:36 PM, mabra <[email protected]> wrote:

> Hi !
>
> Thanks, I understand the basics and was probably not too
> precise .. ;-)
>
> I would like to stay with my configuration files, which are like this:
>
> <?xml version="1.0" encoding="utf-8"?>
> <netCounterMonitorConfiguration xmlns:xsi="http://www.w3.org/2001/
> XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>        <devices>
>                <device id="switch1" enabled="true" pollInterval="300"
> deviceType="lan-switch" >
>                        <textInfo description="The switch in room5."
> note="to repair!!" />
>                        <recipientLinks>
>                                <reference id="1"/>
>                        </recipientLinks>
>                </device>
>        </devices>
>
>        <tables>
>                <table id="tab1" enabled="true" name="ifTable"
> counterReadAttempts="3">
>                        <textInfo description="The switch in room8." note=""
> />
>                        <oidInfo oid=".1.3.6.1.2.1.10.7.2" indexPosition="2"
> />
>                        <deviceLinks>
>                                <reference id="switch1"/>
>                        </deviceLinks>
>                        <rowUsage>all</rowUsage>
>                        <rowLinks>
>                                <reference id="r1"/>
>                        </rowLinks>
>                </table>
>        </tables>
> .............
>
> I feel pretty good with this and have - most of the
> time - no database for these types of apps.
> Using Windsor, I could apply the mssing link:DI,
> which I see mostly for the bigger aspects. But I would
> use the above scheme for some class configuration of
> the app. Additionally, I would have to stay with
> the above scheme for some time.
>
> So, I think, the easiest way would be, to instantiate
> them - as an additional way - by Windsor. It needs one
> line of code for me to read the complete hierarchy in.
>
> If I start with DI, having this as an option to
> create a class would be terribly good. So I came
> to the facilities.
>
> Am I completely wrong??
>
> Thanks++mabra
>
>
> On May 24, 7:12 pm, Jason Meckley <[email protected]> wrote:
> > have a look at the castle wiki<
> http://docs.castleproject.org/Windsor.MainPage.ashx>.
> > you won't need to serialize your objects to configure them. this is what
> > windsor/kernel does.
>
> --
> 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