avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yauheny Mikulski" <ymikul...@lycos.com>
Subject Re: ROLE & Lifecycles in C#
Date Tue, 29 Jul 2003 21:53:05 GMT
>Let's not make it too long ;P
>The interface model will work just fine--esp. for >interfaces where
>there is something to pass in.
>The attribute model would be best for the meta info, >and I believe we
>have already identified a fairly rich set of tags we >can include.

>We might reduce the number of interfaces that we have >though.  For
>example, we could merge Startable and Initializable >to just have
>Initializable and Disposable.  I.e. we should >simplify to the easiest thing.
I agree. 

>Question about that:
>If there is already a IDisposable.Dispose(), then why >not use it?  What
>context is it used with?  I see no sense in >reinventing the wheel.
here is the information from Microsoft MSDN Site:
IDisposable.Dispose() method
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged

If an object's Dispose method is called more than once, the object must ignore all calls after
the first one. The object must not throw an exception if its Dispose method is called multiple
times. Dispose can throw an exception if an error occurs because a resource has already been
freed and Dispose had not been called previously.
This remark is very important cause IDisposable is used widely in .NET  (for example, COM+
and so on)

So it's possible to use it in Avalon # without any our own reinventing.

Best Regards,
  Yauheny Mikulski (Jeff)

"Religion is what the common people see as true,
 the wise people see as false, and 
 the rulers see as useful"     - Seneca

>I'm running out of time for today, so I might be able to get that stuff
>back in to CVS tomorrow.  Yauheny, I believe you can do those changes.
>> In regards to attribute model:
>> I don't like untyped manipulations with names like that:
>> AvalonLifecycle("configurable")
>> The mistake will appear at run-time only.
>> That's very bad.
>> I think Berin's example to me was perfect:[AvalonInitialize]
>> public void setUp() 
>> {} 
>> [AvalonStart] 
>> public void comenzar() 
>> {}
>> Of course, we don't still avoid the problem of run-time exceptions due to using delegates
but this variant seems to be more correct.
>That is the only type of exception that .NET has.
>Anyway, with delegates, they would be used inside the container so they
>may not have to be defined in the framework.
>"They that give up essential liberty to obtain a little temporary safety
>  deserve neither liberty nor safety."
>                 - Benjamin Franklin
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org

Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message