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