Re: Basic quetion about domain model and design pattern

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: QPatrik_L=F6wendahl_=5BC=23_MVP=5D=22?= (patrik.lowendahl.no.freakin.spam_at_home.se)
Date: 11/21/04


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
> 
> 


Relevant Pages

  • Re: Basic quetion about domain model and design pattern
    ... loading the channel object into the application context. ... on the Type object called GetProperties ... One note on this technique tough, reflection is slow. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: N0VFP asks Dr. Ace Ratshit, WH2T, trailer trash, about his ass scabs
    ... Channel, ... Roger doesn't have long hair, ... pluck one verse out of context - that is out of its literary context ... as usual when he thinks Marshall County, ...
    (rec.radio.amateur.policy)
  • Re: Inside Out Thermo Nuke
    ... >> By reflection at a grazing angle, the high Z outer casing creates the ... >> channel for the x-rays emitted by the initiating fission device. ... >> device are reflected when the grazing angle is less than 0.3 degrees (10 ...
    (sci.physics.fusion)
  • Re: Inside Out Thermo Nuke
    ... | radation transport down the channel. ... >> By reflection at a grazing angle, the high Z outer casing creates the ... >> device are reflected when the grazing angle is less than 0.3 degrees (10 ...
    (sci.physics.fusion)
  • Re: Inside Out Thermo Nuke
    ... > By reflection at a grazing angle, the high Z outer casing creates the ... > channel for the x-rays emitted by the initiating fission device. ... > device are reflected when the grazing angle is less than 0.3 degrees ...
    (sci.physics.fusion)