Re: Basic quetion about domain model and design pattern
From: QPatrik_L=F6wendahl_=5BC=23_MVP=5D=22?= (patrik.lowendahl.no.freakin.spam_at_home.se)
Date: 11/21/04
- Next message: Anders Norås: "Re: Basic quetion about domain model and design pattern"
- Previous message: Shabam: "Re: Project Tester"
- In reply to: Julia: "Basic quetion about domain model and design pattern"
- Next in thread: Anders Norås: "Re: Basic quetion about domain model and design pattern"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 21 Nov 2004 23:35:21 +0100
Well basicly you could use reflection to find the properties when your
loading the channel object into the application context. Theres a method
on the Type object called GetProperties
Additionally you could create a custom attribute and mark the properties
you wan't to work with.
One note on this technique tough, reflection is slow. I would implement
some kind of identitymap and store properties for specific channels there.
-- Patrik Löwendahl [C# MVP] cshrp.net - 'Elegant code by witty programmers' cornerstone.se 'IT Training for professionals' Julia wrote: > Hi, > > I have asked this before,and I didn't get answer, I guess I didn't properly > explain self > > I have a domain model in which the lower component-Channel- in the hierarchy > can be replaced > at run time,using reflection > > Application[m_ApplicationContext] > -->Manager > ------>MessagingService > ---------->Channel > > The problem which I faced is that different type of Channel expect different > set of properties > and I would like not to us a HASH table or a collection, > The properties are being loaded by the application into the application > context > > I am looking for a way to easily replace the channel,and the application > context > and to notify the channel when one of its properties was changed. > > > Thanks in advance > >
- Next message: Anders Norås: "Re: Basic quetion about domain model and design pattern"
- Previous message: Shabam: "Re: Project Tester"
- In reply to: Julia: "Basic quetion about domain model and design pattern"
- Next in thread: Anders Norås: "Re: Basic quetion about domain model and design pattern"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|