[Mono-dev] local file based EventLog implementation

Atsushi Eno atsushi at ximian.com
Tue Aug 8 23:04:34 EDT 2006


>>> I'm not sure if it's really necessary to have a separate
>>> EventLogFactory abstraction, we could use a similar approach to the
>>> one used for the Registry API;  meaning, define an interface and
>>> implementations of that interface and have EventLog pick the
>>> implementation for doing all the work (except for basic argument
>>> checks and stuff). Ofcourse, feel free to ignore my remarks as I'm
>>> glad we now have at least an implementation thanks to you
>>> ;-)
>> I'm just curious, what's the benefit of your interface proposal over
>> factory methods? My guess is that we would end up to summarize common
>> code base into an abstract class, which will look like existing
>> EventLogImpl.
> Yeah, we could ofcourse have an abstract base class, but I just didn't see
> the need for implementing both a factory class and an EvenLogImpl.

Ah, ok thanks for the clarification. Well, in that context, unlike
IRegistryApi there are both static members and instance members
and I needed two classes for each of those groups (factory for
static members and impl for instance members). If I switch to
interface based implementation, I still need two types.

Regardless of whether we have one class or two, the total amount of
members we need to implement is the same.

(Any simplification idea is of course welcome :-)

Atsushi Eno

More information about the Mono-devel-list mailing list