> ----- Original Message ----- > From: "Marcin Hoppe" <[EMAIL PROTECTED]> > To: "Gert Driesen" <[EMAIL PROTECTED]> > Cc: <NAntContrib-Developer@lists.sourceforge.net> > Sent: Tuesday, May 31, 2005 8:43 AM > Subject: Re: [NAntC-Dev] DeleteRegistry and WriteRegistry tasks (with unit tests) >
> On 5/30/05, Gert Driesen <[EMAIL PROTECTED]> wrote: > > Don't have time to have a close look at your contribution today, but I do > > have a few remarks on the <deleteregistry> task (hope you don't mind): > > Ok, that's no problem. > > > - Do we need to be able to specify multiple hives in the "hive" attribute ? > > It's an little extra benefit that doesn't cost much, both in terms of > code complexity and runtime performance. Besides, it works like this > in <readregistry> right now. Yeah, I know. If we retain support for multiple hives, then I guess we should remove the specified key/value from all specified hives. Should <deleteregistry> fail if the key/value does not exist (for one of the specified hives) ? > > - Should we add a "value" attribute to allow only a specific value to be > > removed ? > > I've been thinking about it, but there is one thing that makes me > worried: in <writeregistry> there is a "value" attribute to specify a > string that should be written to the registry. If we make an agreement > on do we want it go this way, then your proposal is perfectly fine. I didn't have a look at the <writeregistry> task, but I agree that it does not make sense in that case to use the same attribute name with a different meaning in the <deleteregistry> task. Does <writeregistry> also support just creating keys ? I think we should also have a "valuename" (or whatever you wanna call it) attribute in <writeregistry>. > My alternative proposal would be: > > a) in <writeregistry> we preserve "value" with its current meaning, > b) in <deleteregistry> we introduce a "valuename" attribute that > describes a name of registry value that should be removed. > > > - Would it be ok to always remove the key and the complete subtree (if no > > value is specified) ? > > If we introduce a "valuename" attribute or something similar, then > it's perfectly fine to implement it this way. Ok > > I will also refactor this code a little bit and probably extract an > abstract AbstractRegistryTask. Amount of redundant code makes it a > reasonable idea, IMHO. What do you think about it? I just googled for "Ant registry", and came up with this: http://www.roxes.com/produkte/rat.html This company offers a "win32.registry" task that allows getting/setting/deleting/... registry rentries. This looks like an even better idea to implement. BTW. they use "entry" as name for the registry value ;-) Gert ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ NAntContrib-Developer mailing list NAntContrib-Developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer